mirror of
https://github.com/chatmail/core.git
synced 2026-05-20 15:26:30 +03:00
ci: ensure flake is formatted
This commit is contained in:
22
.github/workflows/nix.yml
vendored
Normal file
22
.github/workflows/nix.yml
vendored
Normal file
@@ -0,0 +1,22 @@
|
|||||||
|
name: Test Nix flake
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
push:
|
||||||
|
branches:
|
||||||
|
- main
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
format:
|
||||||
|
name: check flake formatting
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v4
|
||||||
|
with:
|
||||||
|
show-progress: false
|
||||||
|
- uses: DeterminateSystems/nix-installer-action@main
|
||||||
|
- uses: DeterminateSystems/magic-nix-cache-action@main
|
||||||
|
- run: nix fmt
|
||||||
|
|
||||||
|
# Check that formatting does not change anything.
|
||||||
|
- run: git diff --exit-code
|
||||||
44
flake.nix
44
flake.nix
@@ -533,28 +533,30 @@
|
|||||||
};
|
};
|
||||||
};
|
};
|
||||||
|
|
||||||
devShells.default = let
|
devShells.default =
|
||||||
pkgs = import nixpkgs {
|
let
|
||||||
system = system;
|
pkgs = import nixpkgs {
|
||||||
overlays = [ fenix.overlays.default ];
|
system = system;
|
||||||
};
|
overlays = [ fenix.overlays.default ];
|
||||||
in pkgs.mkShell {
|
};
|
||||||
|
in
|
||||||
|
pkgs.mkShell {
|
||||||
|
|
||||||
buildInputs = with pkgs; [
|
buildInputs = with pkgs; [
|
||||||
(fenix.packages.${system}.complete.withComponents [
|
(fenix.packages.${system}.complete.withComponents [
|
||||||
"cargo"
|
"cargo"
|
||||||
"clippy"
|
"clippy"
|
||||||
"rust-src"
|
"rust-src"
|
||||||
"rustc"
|
"rustc"
|
||||||
"rustfmt"
|
"rustfmt"
|
||||||
])
|
])
|
||||||
cargo-deny
|
cargo-deny
|
||||||
rust-analyzer-nightly
|
rust-analyzer-nightly
|
||||||
cargo-nextest
|
cargo-nextest
|
||||||
perl # needed to build vendored OpenSSL
|
perl # needed to build vendored OpenSSL
|
||||||
git-cliff
|
git-cliff
|
||||||
];
|
];
|
||||||
};
|
};
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user