Skip to content

Commit 0a7d708

Browse files
Add formatting & minimal dependency version check to CI.
1 parent 0f3f8c3 commit 0a7d708

File tree

2 files changed

+12
-2
lines changed

2 files changed

+12
-2
lines changed

.github/workflows/ci.yml

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,10 +8,15 @@ on:
88
- main
99
jobs:
1010
build:
11+
strategy:
12+
matrix:
13+
min-version: [true, false]
1114
runs-on: ubuntu-latest
1215
steps:
1316
- uses: actions/checkout@v3
1417
- uses: cachix/install-nix-action@v22
1518
with:
1619
nix_path: nixpkgs=channel:nixos-unstable
20+
- if: ${{ matrix.min-version }}
21+
run: nix develop . -c cargo update -Z direct-minimal-versions
1722
- run: nix flake check --keep-going --print-build-logs

flake.nix

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -65,15 +65,20 @@
6565
};
6666

6767
devShells.default = pkgs: {
68+
inputsFrom = with pkgs; [ antithesis-sdk-rust.workspace ];
6869
packages = with pkgs; [ rust-analyzer cargo-msrv ];
6970
};
7071

71-
# TODO: Check minimal versions of dependency, and feature flags.
72-
# TODO: Do we what formatters?
72+
# TODO: Check combinations of feature flags & semver check.
7373
checks = { antithesis-sdk-rust, ... }: {
7474
inherit (antithesis-sdk-rust) workspaceMSRV clippy test;
7575
};
7676

77+
formatters = pkgs: {
78+
"*.rs" = "${pkgs.rustfmt}/bin/rustfmt";
79+
"*.nix" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
80+
};
81+
7782
flakelight.builtinFormatters = false;
7883
};
7984
}

0 commit comments

Comments
 (0)