From 11ad29ad2231bae9969a4b11aa90ed2e60e0bed7 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Thu, 4 Apr 2024 13:32:30 +0200 Subject: [PATCH] feat: upgraded CI --- .github/workflows/ci.yaml | 5 ++++- flake.nix | 9 +++++---- 2 files changed, 9 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index d61a6f6..0885a6a 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -22,6 +22,9 @@ jobs: flake-check: runs-on: ubuntu-22.04 + strategy: + matrix: + check: [ "app-hydrate-clippy", "app-ssr-clippy", "site-server-clippy", "site-frontend-clippy", "site-server-docs", "site-server-fmt", "site-server-deny", "site-server-nextest" ] steps: - uses: actions/checkout@v3 - name: Install Nix @@ -35,7 +38,7 @@ jobs: - name: Check flake inputs uses: DeterminateSystems/flake-checker-action@main - name: Run flake checks - run: nix flake check -L + run: nix flake check "./#checks.${system}.{{ matrix.check }}" -L fly-check: runs-on: ubuntu-22.04 diff --git a/flake.nix b/flake.nix index 1aac1ad..73df226 100644 --- a/flake.nix +++ b/flake.nix @@ -135,6 +135,7 @@ in { checks = { + # lint packages app-hydrate-clippy = craneLib.cargoClippy (common_args // { cargoArtifacts = site-server-deps; cargoClippyExtraArgs = "-p site-app --features hydrate -- --deny warnings"; @@ -152,10 +153,12 @@ cargoClippyExtraArgs = "-p site-frontend -- --deny warnings"; }); + # make sure the docs build site-server-doc = craneLib.cargoDoc (common_args // { cargoArtifacts = site-server-deps; }); + # check formatting site-server-fmt = craneLib.cargoFmt { pname = common_args.pname; version = common_args.version; @@ -163,7 +166,7 @@ inherit src; }; - # Audit licenses + # audit licenses site-server-deny = craneLib.cargoDeny { pname = common_args.pname; version = common_args.version; @@ -171,9 +174,7 @@ inherit src; }; - # Run tests with cargo-nextest - # Consider setting `doCheck = false` on `site-server` if you do not want - # the tests to run twice + # run tests site-server-nextest = craneLib.cargoNextest (common_args // { cargoArtifacts = site-server-deps; partitions = 1;