From a3cf7970d17f1c685fb138c2feb7e3b146a1c110 Mon Sep 17 00:00:00 2001 From: Jon Seager Date: Fri, 6 Feb 2026 18:08:18 +0000 Subject: [PATCH] ci: split CI and deploy into separate workflows Move test running to a dedicated push.yml workflow that triggers on both push and PR, and restrict deploy.yml to push-to-main only. --- .github/workflows/deploy.yml | 2 -- .github/workflows/push.yml | 33 +++++++++++++++++++++++++++++++++ 2 files changed, 33 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/push.yml diff --git a/.github/workflows/deploy.yml b/.github/workflows/deploy.yml index 4ade902..71b193d 100644 --- a/.github/workflows/deploy.yml +++ b/.github/workflows/deploy.yml @@ -2,8 +2,6 @@ name: Deploy on: push: branches: ["main"] - pull_request: - branches: ["main"] concurrency: group: ${{ github.workflow }}-${{ github.ref }} diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml new file mode 100644 index 0000000..2f06c7b --- /dev/null +++ b/.github/workflows/push.yml @@ -0,0 +1,33 @@ +name: CI +on: + push: + branches: ["main"] + pull_request: + branches: ["main"] + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Check out code into the Go module directory + uses: actions/checkout@v6 + with: + fetch-depth: 0 + + - name: Install nix + uses: DeterminateSystems/nix-installer-action@main + + - name: Setup Nix cache + uses: nix-community/cache-nix-action@main + with: + primary-key: nix-${{ runner.os }}-${{ hashFiles('**/*.nix', '**/flake.lock') }} + restore-prefixes-first-match: nix-${{ runner.os }}- + + - name: Run tests + run: | + nix develop --command cargo test -- --show-output