mirror of
https://github.com/nix-community/home-manager.git
synced 2025-04-09 10:34:44 +00:00
test.yml: parallel execution
Speed up CI by evaluating our conditions in parallel.
This commit is contained in:
parent
4e12151c9e
commit
030ba92e4b
1 changed files with 33 additions and 16 deletions
49
.github/workflows/test.yml
vendored
49
.github/workflows/test.yml
vendored
|
@ -9,21 +9,38 @@ jobs:
|
|||
fail-fast: false
|
||||
matrix:
|
||||
os: [ubuntu-latest, macos-latest]
|
||||
test-type: [lint, docs, install-test, unit-tests]
|
||||
runs-on: ${{ matrix.os }}
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v30
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
- run: |
|
||||
if grep -R --exclude stdlib-extended.nix literalExample modules ; then
|
||||
echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
- run: nix-build --show-trace -A docs.jsonModuleMaintainers
|
||||
- run: ./format -c
|
||||
- run: nix-shell --show-trace . -A install
|
||||
- run: yes | home-manager -I home-manager=. uninstall
|
||||
- run: nix-shell -j auto --show-trace --arg enableBig false --pure tests -A run.all
|
||||
env:
|
||||
GC_INITIAL_HEAP_SIZE: 4294967296
|
||||
- uses: actions/checkout@v4
|
||||
- uses: cachix/install-nix-action@v30
|
||||
with:
|
||||
nix_path: nixpkgs=channel:nixos-unstable
|
||||
# Lint checks
|
||||
- name: Check for literalExample usage
|
||||
if: matrix.test-type == 'lint'
|
||||
run: |
|
||||
if grep -R --exclude stdlib-extended.nix literalExample modules ; then
|
||||
echo "Error: literalExample should be replaced by literalExpression" > /dev/stderr
|
||||
exit 1
|
||||
fi
|
||||
- name: Run format check
|
||||
if: matrix.test-type == 'lint'
|
||||
run: ./format -c
|
||||
# Documentation checks
|
||||
- name: Build documentation
|
||||
if: matrix.test-type == 'docs'
|
||||
run: nix-build -j auto --show-trace -A docs.jsonModuleMaintainers
|
||||
# Installation tests
|
||||
- name: Run installation test
|
||||
if: matrix.test-type == 'install-test'
|
||||
run: nix-shell -j auto --show-trace . -A install
|
||||
- name: Run uninstallation test
|
||||
if: matrix.test-type == 'install-test'
|
||||
run: yes | home-manager -I home-manager=. uninstall
|
||||
# Unit tests
|
||||
- name: Run unit tests
|
||||
if: matrix.test-type == 'unit-tests'
|
||||
run: nix-shell -j auto --show-trace --arg enableBig false --pure tests -A run.all
|
||||
env:
|
||||
GC_INITIAL_HEAP_SIZE: 4294967296
|
||||
|
|
Loading…
Add table
Reference in a new issue