Skip to content

Commit

Permalink
Allow tests to run as parallel jobs
Browse files Browse the repository at this point in the history
  • Loading branch information
knuton committed Mar 29, 2024
1 parent 4a2b5a0 commit 82d10e6
Showing 1 changed file with 40 additions and 2 deletions.
42 changes: 40 additions & 2 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,45 @@ on:
pull_request:
push:
jobs:
tests:
prepare-matrix:
runs-on: ubuntu-latest
outputs:
integration_tests: ${{ steps.set-matrix.outputs.tests }}
steps:
- uses: actions/checkout@v2
- id: set-matrix
run: |
FILES=$(find testing/integration -name '*.nix' -printf '"%p",')
FILES_JSON="[${FILES%,}]"
echo "::set-output name=ingegration_tests::${FILES_JSON}"
integration-tests:
needs: prepare-matrix
runs-on: ubuntu-latest
strategy:
matrix:
file: ${{fromJson(needs.prepare-matrix.outputs.integration_tests)}}
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
system-features = nixos-test benchmark big-parallel kvm
- run: NIXPKGS_ALLOW_UNFREE=1 nix-build ${{ matrix.file }}

kiosk-tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
system-features = nixos-test benchmark big-parallel kvm
- run: cd kiosk && nix-shell --run bin/test

build-vm:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -12,4 +50,4 @@ jobs:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
system-features = nixos-test benchmark big-parallel kvm
- run: testing/run
- run: NIXPKGS_ALLOW_UNFREE=1 ./build vm

0 comments on commit 82d10e6

Please sign in to comment.