diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 19928de3..cfbf8a7b 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -13,6 +13,12 @@ on: env: RUBY_YJIT_ENABLE: 1 +# Test has had this since it was written; Lint never did, so every push to a +# PR ran a fresh linter to completion alongside the superseded ones. +concurrency: + group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }} + cancel-in-progress: true + jobs: lint: name: Ruby & YAML diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f4e4e0ac..9c01c8dd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -108,7 +108,10 @@ jobs: contains(github.event.pull_request.labels.*.name, 'full-ci') needs: [ functional-test ] runs-on: ubuntu-latest - timeout-minutes: ${{ contains(matrix.ruby-version, 'jruby') && 25 || 8 }} + # Must fit `max_attempts * timeout_minutes` below, plus ~1 min of setup, + # or the last attempt gets killed mid-run and the cell reports `cancelled` + # -- a dead gate. JRuby: 1 + 15 + 15 = 31. MRI: 1 + 3 + 3 = 7, under 8. + timeout-minutes: ${{ contains(matrix.ruby-version, 'jruby') && 31 || 8 }} continue-on-error: ${{ matrix.experimental }} strategy: matrix: @@ -151,17 +154,23 @@ jobs: ruby-cache-version: ${{ matrix.ruby-version }}-${{ matrix.gemfile }}-1 cache-apt-packages: true - - name: Run tests (with 2 retries) + - name: Run tests (with 1 retry) uses: nick-fields/retry@v4 with: - # 7 minutes stopped being enough for JRuby once the suite grew past - # ~600 tests: every JRuby cell on master now burns all three attempts - # on `Timeout of 420000ms hit` and dies at the job cap, so the cell - # has stopped gating anything. Locally the full suite is 390s on - # JRuby with vips and 434s with chunky_png -- the budget is the - # problem, not the driver. + # Measured on master run 32643567648: a clean JRuby attempt is + # 545-713s depending on the gemfile, so 15 min is ~26% headroom over + # the slowest. MRI is 128s against 3 min. timeout_minutes: ${{ contains(matrix.ruby-version, 'jruby') && 15 || 3 }} - max_attempts: 3 + # Two, not three. A third attempt never fit inside the job cap on + # either engine (JRuby 3x15=45 > 25; MRI 3x3=9 > 8), so it only ever + # got killed partway and reported the cell as `cancelled`. Keeping + # the retry budget inside the cap is what makes the cell a real gate. + # + # The retry exists solely for the intermittent JRuby teardown hang + # (#244), which strands the process for minutes *after* the suite + # prints `Finished in ...`. Once #244 is fixed, drop this to a single + # attempt and the JRuby cap to 16 -- that halves the JRuby bill. + max_attempts: 2 command: bin/rake test matrix-screenshot-driver: