2.home-manager/.github/workflows/test.yml
awwpotato 3f591550a9
formatter: remove script, add treefmt.toml + keep-sorted (#7056)
currently ./format does a bunch of stuff with git that was only necessary for nixfmt but not nixfmt-tree, so I deleted it (just use treefmt command directly instead). I also added keep sorted to keep the really long module lists sorted (already used in nixpkgs).
2025-05-20 12:42:51 -05:00

36 lines
1.2 KiB
YAML

name: Test
on:
pull_request:
schedule:
- cron: "30 2 * * *"
jobs:
tests:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
- uses: cachix/install-nix-action@v31
with:
nix_path: nixpkgs=channel:nixos-unstable
extra_nix_config: |
experimental-features = nix-command flakes
- 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: nix fmt -- --ci
- run: nix-shell --show-trace . -A install
- run: yes | home-manager -I home-manager=. uninstall
- name: Run tests
run: nix-build -j auto --show-trace --arg enableBig false --pure --option allow-import-from-derivation false tests -A build.all
env:
GC_INITIAL_HEAP_SIZE: 4294967296
- name: Run tests (with IFD)
run: nix-build -j auto --show-trace --arg enableBig false --pure --arg enableLegacyIfd true tests -A build.all
env:
GC_INITIAL_HEAP_SIZE: 4294967296