Skip to content

Commit

Permalink
ci: build once with devenv
Browse files Browse the repository at this point in the history
  • Loading branch information
sandydoo committed Jan 3, 2025
1 parent c48cfdb commit a3f805d
Showing 1 changed file with 18 additions and 15 deletions.
33 changes: 18 additions & 15 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,18 +9,27 @@ 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]
useDaemon: [true, false]
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: ./
Expand All @@ -31,15 +40,14 @@ jobs:
- run: nix-build test.nix

public-cache-no-signing-key:
needs: [build]
strategy:
matrix:
os: [ubuntu-latest, macos-latest]
useDaemon: [true, false]
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: ./
Expand All @@ -49,6 +57,7 @@ jobs:
- run: nix-build test.nix

private-cache:
needs: [build]
if: ${{ github.ref == 'refs/heads/master' }}
strategy:
matrix:
Expand All @@ -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: ./
Expand All @@ -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: |
Expand All @@ -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: ./
Expand All @@ -109,6 +114,7 @@ jobs:
- run: nix-build test.nix

nix-master:
needs: [build]
strategy:
matrix:
include:
Expand All @@ -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:
Expand Down

0 comments on commit a3f805d

Please sign in to comment.