Bump qs from 6.14.0 to 6.14.1 #509
Workflow file for this run
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: CI | |
| on: push | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| env: | |
| RAILS_ENV: test | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| database: [sqlite, postgres] | |
| steps: | |
| - uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 #v5.0.0 | |
| - uses: cachix/install-nix-action@456688f15bc354bef6d396e4a35f4f89d40bf2b7 #v31.8.2 | |
| - uses: cachix/cachix-action@0fc020193b5a1fa3ac4575aa3a7d3aa6a35435ad # v16 | |
| with: | |
| name: bridgetroll | |
| extraPullNames: devenv | |
| authToken: "${{ secrets.CACHIX_AUTH_TOKEN }}" | |
| - name: Install devenv.sh | |
| run: nix profile add nixpkgs#devenv | |
| # devenv cache includes bundle | |
| - name: Cache .devenv directory | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| id: devenv-cache | |
| with: | |
| path: .devenv | |
| key: ${{ runner.os }}-devenv-${{ hashFiles('devenv.nix', 'devenv.lock', 'devenv.yaml', 'Gemfile.lock', 'yarn.lock', '.ruby-version') }} | |
| restore-keys: | | |
| ${{ runner.os }}-devenv- | |
| - name: Cache node_modules directory | |
| uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0 | |
| id: node_modules-cache | |
| with: | |
| path: node_modules | |
| key: ${{ runner.os }}-node_modules-${{ hashFiles('yarn.lock') }} | |
| restore-keys: | | |
| ${{ runner.os }}-node_modules- | |
| - name: prime devenv | |
| run: devenv shell -i echo 'hi' | |
| - name: Start and wait for postgres | |
| if: ${{ matrix.database == 'postgres' }} | |
| timeout-minutes: 10 | |
| run: | | |
| echo "FORCE_POSTGRES=1" >> $GITHUB_ENV; | |
| try_start_postgres() { | |
| devenv up --detach || exit 1 | |
| for i in $(seq 1 5); do | |
| pg_isready -h localhost -p 5432 -U postgres -q && return 0 | |
| echo "Waiting for postgres... ${i}s" | |
| sleep 1 | |
| done | |
| return 1 | |
| } | |
| try_start_postgres && exit 0 | |
| echo "Postgres did not become ready. Retrying after cleanup..." | |
| rm -rf .devenv | |
| try_start_postgres && exit 0 | |
| echo "Postgres failed to start after retry." | |
| cat .devenv/processes.log || echo "No process log found." | |
| exit 1 | |
| # -i (impure) is necessary to pass CI env vars into devenv shell | |
| # I'm not sure why bundle install / yarn install are necessary, devenv shell should do this | |
| - run: devenv shell -i bundle install | |
| - run: devenv shell -i yarn install | |
| - run: devenv shell -i bin/rails db:setup | |
| - run: devenv shell -i bin/rake parallel:setup | |
| - run: devenv shell -i bin/rake | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@5a1091511ad55cbe89839c7260b706298ca349f7 # 5.5.1 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| slug: railsbridge/bridge_troll | |
| directory: ./coverage | |
| - name: Archive capybara failure screenshots | |
| uses: actions/upload-artifact@330a01c490aca151604b8cf639adc76d48f6c5d4 # 5.0.0 | |
| if: failure() | |
| with: | |
| name: capybara-${{ matrix.database }} | |
| path: tmp/capybara/* | |
| if-no-files-found: ignore |