mirror of
https://github.com/nix-community/dream2nix.git
synced 2024-11-26 19:34:59 +03:00
chore: CI performance improvements
- run more jobs in parallel for `example` and `integration` tests - use cachitx for unit tests
This commit is contained in:
parent
da45122814
commit
aeaf598afd
8
.github/workflows/tests.yml
vendored
8
.github/workflows/tests.yml
vendored
@ -20,7 +20,7 @@ jobs:
|
||||
name: nix-community
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
|
||||
- run: nix run .#tests-examples
|
||||
- run: JOBS=10 nix run .#tests-examples
|
||||
|
||||
tests-pure:
|
||||
runs-on: ubuntu-latest
|
||||
@ -54,7 +54,7 @@ jobs:
|
||||
name: nix-community
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
|
||||
- run: nix run .#tests-integration
|
||||
- run: JOBS=10 nix run .#tests-integration
|
||||
|
||||
tests-unit-nix:
|
||||
runs-on: ubuntu-latest
|
||||
@ -66,6 +66,10 @@ jobs:
|
||||
install_options: '--tarball-url-prefix https://nixos-nix-install-tests.cachix.org/serve'
|
||||
extra_nix_config: |
|
||||
access-tokens = github.com=${{ secrets.GITHUB_TOKEN }}
|
||||
- uses: cachix/cachix-action@v10
|
||||
with:
|
||||
name: nix-community
|
||||
signingKey: '${{ secrets.CACHIX_SIGNING_KEY }}'
|
||||
|
||||
- run: nix run .#tests-unit
|
||||
|
||||
|
@ -53,7 +53,8 @@ in
|
||||
''
|
||||
export STATS_FILE=$(mktemp)
|
||||
if [ -z ''${1+x} ]; then
|
||||
parallel --halt now,fail=1 -j$(nproc) -a <(ls ${examples}) ${testScript}
|
||||
JOBS=''${JOBS:-$(nproc)}
|
||||
parallel --halt now,fail=1 -j$JOBS -a <(ls ${examples}) ${testScript}
|
||||
else
|
||||
arg1=$1
|
||||
shift
|
||||
|
@ -48,7 +48,8 @@ in
|
||||
''
|
||||
export STATS_FILE=$(mktemp)
|
||||
if [ -z ''${1+x} ]; then
|
||||
parallel --halt now,fail=1 -j$(nproc) -a <(ls ${tests}) ${testScript}
|
||||
JOBS=''${JOBS:-$(nproc)}
|
||||
parallel --halt now,fail=1 -j$JOBS -a <(ls ${tests}) ${testScript}
|
||||
else
|
||||
arg1=$1
|
||||
shift
|
||||
|
Loading…
Reference in New Issue
Block a user