Bump bootsnap from 1.19.0 to 1.20.0 #20949
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: Test | |
| on: | |
| pull_request: | |
| workflow_call: | |
| permissions: {} | |
| jobs: | |
| run-test-suites-check: | |
| name: Check if Rails tests need to run | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Determine if rails tests are needed | |
| id: check-rails-relevant-changes | |
| continue-on-error: true | |
| run: | | |
| if [ ${{ github.event_name }} == "pull_request" ]; then | |
| git fetch origin | |
| RELEVANT_DIRS=$(git diff origin/${{ github.event.pull_request.base.ref }}...HEAD --name-only) | |
| if [ -z "$(echo "$RELEVANT_DIRS" | egrep -v "^(.github|adr|aws|docs|storage|terraform)/")" ]; then | |
| echo "No relevant changes detected, skipping rails tests" | |
| echo "RUN_TEST_SUITES=false" >> $GITHUB_ENV | |
| exit 0 | |
| fi | |
| fi | |
| echo "Not a pull request or detected relevant changes: Running rails tests" | |
| echo "RUN_TEST_SUITES=true" >> $GITHUB_ENV | |
| - name: Run rails tests if diff check fails | |
| id: check-rails-relevant-changes-failure | |
| run: | | |
| if [[ ${{ steps.check-rails-relevant-changes.outcome }} == failure ]]; then | |
| echo "RUN_TEST_SUITES=true" >> $GITHUB_OUTPUT | |
| else | |
| echo "RUN_TEST_SUITES=$RUN_TEST_SUITES" >> $GITHUB_OUTPUT | |
| fi | |
| outputs: | |
| run-test-suites: ${{ steps.check-rails-relevant-changes-failure.outputs.RUN_TEST_SUITES }} | |
| rspec: | |
| name: RSpec | |
| runs-on: ubuntu-latest | |
| needs: run-test-suites-check | |
| if: needs.run-test-suites-check.outputs.run-test-suites == 'true' | |
| services: | |
| postgres: | |
| image: postgres:17.2 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| RAILS_ENV: test | |
| DATABASE_HOST: localhost | |
| DATABASE_USER: postgres | |
| DATABASE_PASSWORD: postgres | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .tool-versions | |
| cache: yarn | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Precompile assets | |
| run: bin/rails assets:precompile | |
| - name: Setup parallel database | |
| run: | | |
| bin/rails parallel:create | |
| bin/rails parallel:load_schema | |
| - name: Run tests | |
| run: bin/rails parallel:spec | |
| - name: Run tests tagged for local_users | |
| run: bundle exec rspec -t local_users | |
| env: | |
| MAVIS__CIS2__ENABLED: false | |
| end-to-end: | |
| name: End to End | |
| needs: run-test-suites-check | |
| if: ${{ needs.run-test-suites-check.outputs.run-test-suites == 'true' && github.event_name != 'push' }} | |
| permissions: | |
| id-token: write | |
| contents: write | |
| uses: ./.github/workflows/end-to-end-tests.yml | |
| with: | |
| git_reference_for_database_image: ${{ github.event.pull_request.base.ref }} | |
| secrets: | |
| HTTP_AUTH_TOKEN_FOR_TESTS: ${{ secrets.HTTP_AUTH_TOKEN_FOR_TESTS }} | |
| MAVIS_TESTING_REPO_ACCESS_TOKEN: ${{ secrets.MAVIS_TESTING_REPO_ACCESS_TOKEN }} | |
| seeds: | |
| name: Seeds | |
| runs-on: ubuntu-latest | |
| needs: run-test-suites-check | |
| if: needs.run-test-suites-check.outputs.run-test-suites == 'true' | |
| services: | |
| postgres: | |
| image: postgres:17.2 | |
| env: | |
| POSTGRES_PASSWORD: postgres | |
| options: >- | |
| --health-cmd pg_isready | |
| --health-interval 10s | |
| --health-timeout 5s | |
| --health-retries 5 | |
| ports: | |
| - 5432:5432 | |
| env: | |
| RAILS_ENV: development | |
| DATABASE_URL: postgres://postgres:postgres@localhost:5432/manage_vaccinations_development | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .tool-versions | |
| cache: yarn | |
| - uses: ruby/setup-ruby@v1 | |
| with: | |
| bundler-cache: true | |
| - name: Check seeds run | |
| run: bin/rails db:prepare | |
| jest: | |
| name: Jest | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: actions/setup-node@v6 | |
| with: | |
| node-version-file: .tool-versions | |
| cache: yarn | |
| - run: yarn install --immutable --immutable-cache --check-cache | |
| - run: yarn test | |
| terraform: | |
| name: Terraform | |
| runs-on: ubuntu-latest | |
| defaults: | |
| run: | |
| working-directory: terraform | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - uses: hashicorp/setup-terraform@v3 | |
| with: | |
| terraform_version: 1.13.3 | |
| - run: terraform init -backend=false | |
| - run: terraform validate |