Skip to content

Commit

Permalink
Try GitHub actions configuration
Browse files Browse the repository at this point in the history
  • Loading branch information
webeweb committed Feb 2, 2021
1 parent dd43a76 commit 6a6cae8
Showing 1 changed file with 22 additions and 2 deletions.
24 changes: 22 additions & 2 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@ name: "build"
on: [ push, release, pull_request ]

jobs:

build:
name: "PHP ${{ matrix.php-version }}"
runs-on: ubuntu-18.04
Expand Down Expand Up @@ -39,7 +40,7 @@ jobs:
php coveralls.phar --version
- name: "Tests"
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml
run: vendor/bin/phpunit --coverage-clover build/logs/clover.xml --coverage-html build/logs

- name: "Coverage"
env:
Expand All @@ -48,6 +49,14 @@ jobs:
COVERALLS_PARALLEL: true
run: php coveralls.phar -v

- name: "Artifact"
uses: actions/upload-artifact@v2
with:
name: "coverage-${{ matrix.php-version }}"
path: |
build/logs/
!build/logs/clover.xml
coverage:
name: "Coverage"
runs-on: ubuntu-18.04
Expand Down Expand Up @@ -86,5 +95,16 @@ jobs:
chmod +x phpmetrics.phar
php phpmetrics.phar --version
- name: "Tests"
run: vendor/bin/phpunit --log-junit build/logs/junit.xml

- name: "Metrics"
run: php phpmetrics.phar --report-html=build/logs/ src/
run: php phpmetrics.phar --report-html=build/logs/ src/ --git --junit=build/logs/junit.xml

- name: "Artifact"
uses: actions/upload-artifact@v2
with:
name: "metrics"
path: |
build/logs/
!build/logs/junit.xml

0 comments on commit 6a6cae8

Please sign in to comment.