From c0df96d249252dc76363a40adc945e1d632d1631 Mon Sep 17 00:00:00 2001 From: Thiago Esteves Date: Wed, 11 Nov 2026 09:34:55 -0300 Subject: [PATCH] fix(ci): remove setup job to stop test/analysis blocking on unrelated matrix legs needs: setup made every test leg (and the single analysis job) wait for all setup matrix legs to finish, not just the matching one, needlessly lengthening the critical path when one leg is slow. Folding setup's steps directly into test and analysis removes the cross-job dependency and the duplicate checkout/cache/install work it required. Co-Authored-By: Claude Sonnet 5 --- .github/workflows/ci.yaml | 70 +++------------------------------------ 1 file changed, 4 insertions(+), 66 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d460b79..1f7c302 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -13,8 +13,8 @@ env: node_version: '20' jobs: - setup: - name: Setup (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}) + test: + name: Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}) strategy: fail-fast: false matrix: @@ -28,7 +28,8 @@ jobs: otp: '29.0.2' runs-on: ubuntu-22.04 steps: - - uses: actions/checkout@v7 + - name: Checkout code + uses: actions/checkout@v7 - name: Setup BEAM uses: erlef/setup-beam@v1 @@ -79,74 +80,11 @@ jobs: - name: Compile run: mix compile --warnings-as-errors - test: - name: Test (Elixir ${{ matrix.elixir }} / OTP ${{ matrix.otp }}) - needs: setup - strategy: - fail-fast: false - matrix: - include: - - elixir: '1.19.5' - otp: '28.5.0.6' - - elixir: '1.20.1' - otp: '29.0.2' - runs-on: ubuntu-22.04 - steps: - - name: Checkout code - uses: actions/checkout@v7 - - - name: Setup BEAM - uses: erlef/setup-beam@v1 - with: - otp-version: '${{ matrix.otp }}' - elixir-version: '${{ matrix.elixir }}' - - - name: Setup Node - uses: actions/setup-node@v7 - with: - node-version: '${{ env.node_version }}' - - - name: Cache - uses: actions/cache@v6 - with: - path: | - _build - deps - key: | - observer-web-${{ matrix.elixir }}-${{ matrix.otp }}-${{ hashFiles('mix.lock') }}-2025-02-01 - restore-keys: | - observer-web-${{ matrix.elixir }}-${{ matrix.otp }}- - - - name: Cache npm dependencies - uses: actions/cache@v6 - with: - path: assets/node_modules - key: | - observer-web-assets-${{ hashFiles('assets/package-lock.json') }} - - - name: Seed static directory - run: mkdir -p priv/static && touch priv/static/app.css && touch priv/static/app.js - - - name: Install npm dependencies - run: npm ci --prefix assets - - - name: Install Elixir dependencies - run: mix deps.get - - # tailwind/esbuild are dev-only deps (mix.exs), and the real build has to land on disk - # before the implicit compile `mix coveralls.html` triggers next, which compiles - # Observer.Web.Assets - that module reads app.css/app.js at compile time. - - name: Build assets - run: mix assets.build - env: - MIX_ENV: dev - - name: Run tests run: mix coveralls.html analysis: name: Static Analysis - needs: setup runs-on: ubuntu-22.04 steps: - name: Checkout code