From 841a2abb9aa39f3e11a1dd566a524dba544c7e54 Mon Sep 17 00:00:00 2001 From: Sefa Eyeoglu Date: Tue, 18 Feb 2025 11:15:40 +0100 Subject: [PATCH] ci: improve CI workflows Signed-off-by: Sefa Eyeoglu --- .github/workflows/ci.yaml | 44 +++++++++++++++++++++++++++++++++++ .github/workflows/format.yaml | 18 -------------- .github/workflows/reuse.yaml | 15 ------------ 3 files changed, 44 insertions(+), 33 deletions(-) create mode 100644 .github/workflows/ci.yaml delete mode 100644 .github/workflows/format.yaml delete mode 100644 .github/workflows/reuse.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..855d39b --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,44 @@ +# SPDX-FileCopyrightText: 2024 Sefa Eyeoglu +# +# SPDX-License-Identifier: MIT + +name: CI + +on: [push, pull_request] + +jobs: + format: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Check formatting + run: | + nix fmt -- --ci + + check-readme: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - uses: cachix/install-nix-action@v30 + with: + nix_path: nixpkgs=channel:nixos-unstable + - name: Check README contents + run: | + nix run .#update-readme + if git diff-index --quiet HEAD --; then + echo "All good!" + else + git diff + echo "The README is out of date. Please run 'nix run .#update-readme' to update the README." >&2 + exit 1 + fi + + test: + runs-on: ubuntu-24.04 + steps: + - uses: actions/checkout@v4 + - name: REUSE Compliance Check + uses: fsfe/reuse-action@v5 diff --git a/.github/workflows/format.yaml b/.github/workflows/format.yaml deleted file mode 100644 index 144b74e..0000000 --- a/.github/workflows/format.yaml +++ /dev/null @@ -1,18 +0,0 @@ -# SPDX-FileCopyrightText: 2024 Sefa Eyeoglu -# -# SPDX-License-Identifier: MIT - -name: Nix Format Check - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - uses: DeterminateSystems/nix-installer-action@main - - uses: DeterminateSystems/magic-nix-cache-action@main - - name: Check formatting - run: | - nix fmt -- --ci diff --git a/.github/workflows/reuse.yaml b/.github/workflows/reuse.yaml deleted file mode 100644 index 8b79fe5..0000000 --- a/.github/workflows/reuse.yaml +++ /dev/null @@ -1,15 +0,0 @@ -# SPDX-FileCopyrightText: 2022 Free Software Foundation Europe e.V. -# -# SPDX-License-Identifier: CC0-1.0 - -name: REUSE Compliance Check - -on: [push, pull_request] - -jobs: - test: - runs-on: ubuntu-24.04 - steps: - - uses: actions/checkout@v4 - - name: REUSE Compliance Check - uses: fsfe/reuse-action@v5