Coverage Report #254
This file contains hidden or 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: Coverage Report | |
| on: | |
| schedule: | |
| - cron: '0 2 * * *' # Daily at 2am | |
| workflow_dispatch: # Manual trigger | |
| jobs: | |
| coverage: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v5 | |
| - name: Setup environment | |
| uses: ./.github/actions/setup-environment | |
| - name: Run all tests with coverage | |
| env: | |
| RAILS_ENV: test | |
| SIMPLECOV_COBERTURA: true | |
| RSPEC_JUNIT_FORMATTER: true | |
| RSPEC_JUNIT_OUTPUT: junit.xml | |
| run: | | |
| bundle exec rails db:migrate | |
| bundle exec rails parallel:prepare | |
| bundle exec rake coverage:parallel | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/test-results-action@v1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| - name: Run all tests with coverage (normal format) | |
| env: | |
| RAILS_ENV: test | |
| run: | | |
| bundle exec rake coverage:parallel | |
| - name: Deploy to Bunny | |
| uses: R-J-dev/bunny-deploy@v3.0.0 | |
| with: | |
| access-key: ${{ secrets.BUNNY_ACCESS_KEY }} | |
| directory-to-upload: coverage | |
| storage-endpoint: "https://storage.bunnycdn.com" | |
| storage-zone-name: "play-test-coverage" | |
| storage-zone-password: ${{ secrets.BUNNY_STORAGE_ZONE_PASSWORD }} | |
| concurrency: "5" | |
| enable-delete-action: true | |
| enable-purge-pull-zone: true | |
| pull-zone-id: "4593821" | |
| replication-timeout: "15000" |