diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index c590202..2809536 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -9,7 +9,20 @@ env: ACTIONS_STEP_DEBUG: true jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 + - run: nix profile install nixpkgs#devenv + - name: Build + run: devenv shell -- pnpm build + # Check that build was committed + - name: Verify latest build + run: git diff --exit-code + public-cache: + needs: [build] strategy: matrix: os: [ubuntu-latest, macos-latest] @@ -17,10 +30,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build - # check if typescript generation was committed - - run: git diff --exit-code - uses: cachix/install-nix-action@v30 - name: Test public cache uses: ./ @@ -31,6 +40,7 @@ jobs: - run: nix-build test.nix public-cache-no-signing-key: + needs: [build] strategy: matrix: os: [ubuntu-latest, macos-latest] @@ -38,8 +48,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build - uses: cachix/install-nix-action@v30 - name: Test public cache no signing key uses: ./ @@ -49,6 +57,7 @@ jobs: - run: nix-build test.nix private-cache: + needs: [build] if: ${{ github.ref == 'refs/heads/master' }} strategy: matrix: @@ -57,8 +66,6 @@ jobs: runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build - uses: cachix/install-nix-action@v30 - name: Test private cache uses: ./ @@ -70,14 +77,13 @@ jobs: - run: nix-build test.nix push-paths: + needs: [build] strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build - uses: cachix/install-nix-action@v30 - id: paths run: | @@ -91,14 +97,13 @@ jobs: pathsToPush: "${{ steps.paths.outputs.OUT_PATHS }}" installCommand: + needs: [build] strategy: matrix: os: [ubuntu-latest, macos-latest] runs-on: ${{ matrix.os }} steps: - uses: actions/checkout@v4 - - run: pnpm install --frozen-lockfile - - run: pnpm build - uses: cachix/install-nix-action@v30 - name: Test private cache uses: ./ @@ -109,6 +114,7 @@ jobs: - run: nix-build test.nix nix-master: + needs: [build] strategy: matrix: include: @@ -133,9 +139,6 @@ jobs: install_url: https://hydra.nixos.org/job/nix/master/installerScript/latest-finished/download/1/install install_options: "--tarball-url-prefix http://localhost:8080" - - run: pnpm install --frozen-lockfile - - run: pnpm build - - name: Test public cache uses: ./ with: