From 11ad29ad2231bae9969a4b11aa90ed2e60e0bed7 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Thu, 4 Apr 2024 13:32:30 +0200 Subject: [PATCH 1/5] 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; From 0af6c991373c6b34e0ea2bd57a1b6b24795b84e2 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Thu, 4 Apr 2024 13:35:24 +0200 Subject: [PATCH 2/5] fix(ci): fixed system string interpolation --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0885a6a..0f69e99 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,7 @@ jobs: - name: Check flake inputs uses: DeterminateSystems/flake-checker-action@main - name: Run flake checks - run: nix flake check "./#checks.${system}.{{ matrix.check }}" -L + run: nix flake check "./#checks.x86_64-linux.{{ matrix.check }}" -L fly-check: runs-on: ubuntu-22.04 From 896db4f10c9e687c199a12478e84f8beef24e2e5 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Thu, 4 Apr 2024 13:36:26 +0200 Subject: [PATCH 3/5] fix(ci): fix string interpolation again --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0f69e99..9676d8e 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,7 @@ jobs: - name: Check flake inputs uses: DeterminateSystems/flake-checker-action@main - name: Run flake checks - run: nix flake check "./#checks.x86_64-linux.{{ matrix.check }}" -L + run: nix flake check "./#checks.x86_64-linux.${{ matrix.check }}" -L fly-check: runs-on: ubuntu-22.04 From b3fb8587af4e2f6fa5793ce13b8261c33124ff85 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Thu, 4 Apr 2024 13:37:26 +0200 Subject: [PATCH 4/5] fix(ci): fix nix command for checks --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 9676d8e..0b42bf1 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -38,7 +38,7 @@ jobs: - name: Check flake inputs uses: DeterminateSystems/flake-checker-action@main - name: Run flake checks - run: nix flake check "./#checks.x86_64-linux.${{ matrix.check }}" -L + run: nix build "./#checks.x86_64-linux.${{ matrix.check }}" -L fly-check: runs-on: ubuntu-22.04 From b5f103d6c97cc475141522c4c8d3a3c3bf038294 Mon Sep 17 00:00:00 2001 From: John Lewis Date: Thu, 4 Apr 2024 13:38:34 +0200 Subject: [PATCH 5/5] fix(ci): fix name of `site-server-doc` in ci matrix --- .github/workflows/ci.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index 0b42bf1..1045436 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -24,7 +24,7 @@ jobs: 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" ] + check: [ "app-hydrate-clippy", "app-ssr-clippy", "site-server-clippy", "site-frontend-clippy", "site-server-doc", "site-server-fmt", "site-server-deny", "site-server-nextest" ] steps: - uses: actions/checkout@v3 - name: Install Nix