From 8b6534cc64cc6e467cd8edadb976e84ebc113c46 Mon Sep 17 00:00:00 2001 From: xnoto Date: Thu, 30 Apr 2026 09:59:57 -0600 Subject: [PATCH] ci: split test-and-sync into two workflows MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Sync ArgoCD was an entry on every PR's check list (showing as "skipping") because it lived in the same workflow as the pre-commit test job, gated by an if condition. Split into two workflows so the PR check list only contains the pre-commit run: - test.yml — pre-commit on PR + push to main - sync.yml — Sync ArgoCD on push to main only Co-Authored-By: Claude Opus 4.7 (1M context) --- .../workflows/{test-and-sync.yml => sync.yml} | 21 +------------- .github/workflows/test.yml | 29 +++++++++++++++++++ 2 files changed, 30 insertions(+), 20 deletions(-) rename .github/workflows/{test-and-sync.yml => sync.yml} (57%) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test-and-sync.yml b/.github/workflows/sync.yml similarity index 57% rename from .github/workflows/test-and-sync.yml rename to .github/workflows/sync.yml index cf39a09..34f9954 100644 --- a/.github/workflows/test-and-sync.yml +++ b/.github/workflows/sync.yml @@ -1,40 +1,21 @@ --- -name: test-and-sync +name: sync on: push: branches: - main - pull_request: - types: [opened, synchronize, reopened] workflow_dispatch: permissions: contents: read jobs: - test: - name: Pre-commit Tests - runs-on: ubuntu-latest - steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Setup Python - uses: actions/setup-python@v5 - with: - python-version: "3.12" - - - name: pre-commit tests - uses: pre-commit/action@v3.0.1 - sync: name: Sync ArgoCD # In-cluster runner; kubectl uses its auto-mounted SA token to talk to # the API directly. The tfroot-runner image has kubectl preinstalled. runs-on: arc-tf - needs: [test] - if: github.event_name == 'push' && github.ref == 'refs/heads/main' steps: - name: Sync ArgoCD bootstrap Applications diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..46a4ce1 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,29 @@ +--- +name: test + +on: + push: + branches: + - main + pull_request: + types: [opened, synchronize, reopened] + workflow_dispatch: + +permissions: + contents: read + +jobs: + test: + name: Pre-commit Tests + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Setup Python + uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: pre-commit tests + uses: pre-commit/action@v3.0.1