Skip to content

Commit 8b6534c

Browse files
xnotoclaude
andcommitted
ci: split test-and-sync into two workflows
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) <noreply@anthropic.com>
1 parent 0f50a54 commit 8b6534c

2 files changed

Lines changed: 30 additions & 20 deletions

File tree

Lines changed: 1 addition & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,40 +1,21 @@
11
---
2-
name: test-and-sync
2+
name: sync
33

44
on:
55
push:
66
branches:
77
- main
8-
pull_request:
9-
types: [opened, synchronize, reopened]
108
workflow_dispatch:
119

1210
permissions:
1311
contents: read
1412

1513
jobs:
16-
test:
17-
name: Pre-commit Tests
18-
runs-on: ubuntu-latest
19-
steps:
20-
- name: Checkout repository
21-
uses: actions/checkout@v4
22-
23-
- name: Setup Python
24-
uses: actions/setup-python@v5
25-
with:
26-
python-version: "3.12"
27-
28-
- name: pre-commit tests
29-
uses: pre-commit/action@v3.0.1
30-
3114
sync:
3215
name: Sync ArgoCD
3316
# In-cluster runner; kubectl uses its auto-mounted SA token to talk to
3417
# the API directly. The tfroot-runner image has kubectl preinstalled.
3518
runs-on: arc-tf
36-
needs: [test]
37-
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
3819

3920
steps:
4021
- name: Sync ArgoCD bootstrap Applications

.github/workflows/test.yml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
---
2+
name: test
3+
4+
on:
5+
push:
6+
branches:
7+
- main
8+
pull_request:
9+
types: [opened, synchronize, reopened]
10+
workflow_dispatch:
11+
12+
permissions:
13+
contents: read
14+
15+
jobs:
16+
test:
17+
name: Pre-commit Tests
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@v4
22+
23+
- name: Setup Python
24+
uses: actions/setup-python@v5
25+
with:
26+
python-version: "3.12"
27+
28+
- name: pre-commit tests
29+
uses: pre-commit/action@v3.0.1

0 commit comments

Comments
 (0)