Develop #25
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: test-coverage | |
on: | |
workflow_dispatch: | |
pull_request: | |
types: | |
- opened | |
branches: | |
- "master" | |
- "develop" | |
push: | |
branches: | |
- "master" | |
jobs: | |
run-tests: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Init application | |
run: | | |
cp .env.example .env | |
docker-compose -f docker-compose.dev.yml up --build -d | |
docker exec -i -u root buzzer_app composer install | |
docker exec -i -u root buzzer_app php artisan key:generate | |
docker exec -i -u root buzzer_app php artisan migrate | |
- name: Run tests and generate xml report | |
run: docker exec -i -u root buzzer_app vendor/bin/phpunit --coverage-clover=coverage.xml | |
- name: Upload coverage reports to Codecov | |
uses: codecov/codecov-action@v3 | |
env: | |
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |