Merge pull request #44 from jpr5/fix/ci-hardening #90
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: Tests | |
| on: | |
| push: | |
| branches: [master, 'jpr5/*'] | |
| pull_request: | |
| branches: [master] | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4 | |
| with: | |
| lfs: true | |
| persist-credentials: false | |
| - name: Set up Ruby | |
| uses: ruby/setup-ruby@6aaa311d81eba98ae12eaffbcb63296ace0efcde # v1 | |
| with: | |
| ruby-version: '3.2' | |
| bundler-cache: true | |
| - name: Create cache directory | |
| run: mkdir -p cache | |
| - name: Run tests | |
| run: bundle exec rspec --format documentation | |
| env: | |
| RACK_ENV: test | |
| - name: Archive coverage report | |
| uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4 | |
| if: always() | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| retention-days: 7 |