From 94767a2c4bc56e984e1865c4839b16c98826da25 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jalil=20David=20Salam=C3=A9=20Messina?= Date: Sun, 14 Jan 2024 17:59:46 +0100 Subject: [PATCH] feat: Add check workflow --- .github/workflows/check.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/check.yml diff --git a/.github/workflows/check.yml b/.github/workflows/check.yml new file mode 100644 index 0000000..6f9d20f --- /dev/null +++ b/.github/workflows/check.yml @@ -0,0 +1,28 @@ +name: Check flake +on: + push: + pull_request: + schedule: + - cron: 5 4 * * 5 # At 04:05 on Friday. + +jobs: + check: + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@v9 + - uses: DeterminateSystems/magic-nix-cache-action@v2 + - name: Check formatting + run: nix run .#formatter.x86_64-linux -- --check + - name: Run `nix flake check` + run: nix flake check + lockfile: + needs: check + if: ${{ github.event_name == 'schedule' }} # only run when scheduled + runs-on: ubuntu-22.04 + steps: + - uses: actions/checkout@v3 + - uses: DeterminateSystems/nix-installer-action@v9 + - uses: DeterminateSystems/update-flake-lock@v20 + - name: Run `nix flake check` + run: nix flake check