Skip to content

Commit

Permalink
Coveralls + workflow support
Browse files Browse the repository at this point in the history
  • Loading branch information
IDCT Bartosz Pachołek committed Jan 5, 2020
1 parent a30125e commit 4ffb20f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: All tests using PHPUnit

on: [push]

jobs:
build:

runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v1
with:
ref: master

- name: reattach HEAD to Head Ref
run: git checkout "$(echo ${{ github.head_ref }} | sed -E 's|refs/[a-zA-Z]+/||')"
if: github.head_ref != ''
- name: reattach HEAD to Ref
run: git checkout "$(echo ${{ github.ref }} | sed -E 's|refs/[a-zA-Z]+/||')"
if: github.head_ref == ''

- name: Setup PHP
uses: shivammathur/setup-php@master
with:
php-version: '7.1'

- name: Validate composer.json and composer.lock
run: composer validate

- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Run all tests
run: composer run-script test

- name: Send data to coveralls
env: # Or as an environment variable
COVERALLS_RUN_LOCALLY: ${{ secrets.COVERALLS_RUN_LOCALLY }}
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }}
run: composer run-script generate-coveralls

0 comments on commit 4ffb20f

Please sign in to comment.