Skip to content

Commit

Permalink
Add formatting & minimal dependency version check to CI.
Browse files Browse the repository at this point in the history
  • Loading branch information
wsx-antithesis committed May 6, 2024
1 parent 0f3f8c3 commit d1381e6
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 2 deletions.
5 changes: 5 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,10 +8,15 @@ on:
- main
jobs:
build:
strategy:
matrix:
min-version: [true, false]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v22
with:
nix_path: nixpkgs=channel:nixos-unstable
- if: ${{ matrix.min-version }}
run: nix shell . -c cargo update -Z direct-minimal-versions
- run: nix flake check --keep-going --print-build-logs
8 changes: 6 additions & 2 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -68,12 +68,16 @@
packages = with pkgs; [ rust-analyzer cargo-msrv ];
};

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

formatters = pkgs: {
"*.rs" = "${pkgs.rustfmt}/bin/rustfmt";
"*.nix" = "${pkgs.nixpkgs-fmt}/bin/nixpkgs-fmt";
};

flakelight.builtinFormatters = false;
};
}

0 comments on commit d1381e6

Please sign in to comment.