mirror of
https://github.com/DeterminateSystems/flake-checker.git
synced 2024-09-11 14:25:44 +03:00
Add a separate GHA job for clean flake.lock
This commit is contained in:
parent
26a978ef91
commit
68f1771ba1
18
.github/workflows/ci.yml
vendored
18
.github/workflows/ci.yml
vendored
@ -1,4 +1,4 @@
|
||||
name: CI
|
||||
name: Flake checker CI
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
@ -6,8 +6,8 @@ on:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
check-flake:
|
||||
name: Check flake.lock test
|
||||
check-flake-dirty:
|
||||
name: Check flake.lock test (dirty)
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
@ -15,4 +15,14 @@ jobs:
|
||||
uses: DeterminateSystems/nix-installer-action@v2
|
||||
- name: Check flake.lock
|
||||
run: |
|
||||
nix develop .#ci -c cargo run -- ./flake.bad.lock
|
||||
nix develop .#ci -c cargo run -- ./flake.dirty.lock
|
||||
check-flake-clean:
|
||||
name: Check flake.lock test (dirty)
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v3
|
||||
- name: Install Nix
|
||||
uses: DeterminateSystems/nix-installer-action@v2
|
||||
- name: Check flake.lock
|
||||
run: |
|
||||
nix develop .#ci -c cargo run
|
||||
|
@ -13,11 +13,6 @@ pub struct Summary {
|
||||
impl Summary {
|
||||
pub fn generate_markdown(&self) -> Result<(), FlakeCheckerError> {
|
||||
let summary_md = if !self.issues.is_empty() {
|
||||
// TODO: make this more elegant
|
||||
let has_disallowed = !&self.disallowed().is_empty();
|
||||
let has_outdated = !&self.outdated().is_empty();
|
||||
let has_non_upstream = !&self.non_upstream().is_empty();
|
||||
|
||||
let supported_ref_names = ALLOWED_REFS.map(|r| format!("* `{r}`")).join("\n");
|
||||
|
||||
let data = json!({
|
||||
@ -25,9 +20,9 @@ impl Summary {
|
||||
"disallowed": &self.disallowed(),
|
||||
"outdated": &self.outdated(),
|
||||
"non_upstream": &self.non_upstream(),
|
||||
"has_disallowed": has_disallowed,
|
||||
"has_outdated": has_outdated,
|
||||
"has_non_upstream": has_non_upstream,
|
||||
"has_disallowed": !&self.disallowed().is_empty(),
|
||||
"has_outdated": !&self.outdated().is_empty(),
|
||||
"has_non_upstream": !&self.non_upstream().is_empty(),
|
||||
// Constants
|
||||
"max_days": MAX_DAYS,
|
||||
"supported_ref_names": supported_ref_names,
|
||||
|
Loading…
Reference in New Issue
Block a user