From 6b193374731176bb26534ae077539a78e293f567 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Christina=20S=C3=B8rensen?= Date: Tue, 17 Sep 2024 08:28:03 +0200 Subject: [PATCH] ci: run all flake checks MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Adds *fake* hydra-like CI tests for the flake checks. Signed-off-by: Christina Sørensen --- .github/workflows/build.yaml | 17 ----------------- .github/workflows/checks.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 17 deletions(-) delete mode 100644 .github/workflows/build.yaml create mode 100644 .github/workflows/checks.yml diff --git a/.github/workflows/build.yaml b/.github/workflows/build.yaml deleted file mode 100644 index 4e01e3a..0000000 --- a/.github/workflows/build.yaml +++ /dev/null @@ -1,17 +0,0 @@ -name: "Build" -on: - push: - branches: - - "*" - pull_request: - branches: - - "master" -jobs: - tests: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v3 - - uses: cachix/install-nix-action@v19 - with: - nix_path: nixpkgs=channel:nixos-unstable - - run: nix-build diff --git a/.github/workflows/checks.yml b/.github/workflows/checks.yml new file mode 100644 index 0000000..52cb562 --- /dev/null +++ b/.github/workflows/checks.yml @@ -0,0 +1,33 @@ +name: "Flake Checks" +on: + push: + branches: + - "master" + pull_request: + branches: + - "master" +jobs: + nix_flake_check: + name: Nix ${{ matrix.systems }} ${{ matrix.checks }} + runs-on: ${{ matrix.os }} + strategy: + matrix: + checks: [build, formatting, pre-commit-check, vm_integration_tests] + os: [ubuntu-latest, macos-latest] + systems: ["x86_64-linux", "aarch64-linux","x86_64-darwin", "aarch64-darwin"] + include: + - os: ubuntu-latest + systems: ["x86_64-linux", "aarch64-linux"] + checks: [build, formatting, pre-commit-check, vm_integration_tests] + - os: macos-latest + systems: ["x86_64-darwin", "aarch64-darwin"] + checks: [build, formatting, pre-commit-check, vm_integration_tests] + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Install Nix + uses: DeterminateSystems/nix-installer-action@main + - name: Setup Nix cache + uses: DeterminateSystems/magic-nix-cache-action@main + - name: Nix Flake Check + run: nix build ./#checks.${{ matrix.systems }}.${{ matrix.checks }} -L