Skip to content

Commit 4b36567

Browse files
kylehowellsclaude
andcommitted
Run macOS CI only on tag pushes to save credits
- Linux tests run on every push (continuous integration) - macOS tests only run on tag pushes (release verification) - Lint job also only runs on tags (requires macOS) Uses `if: startsWith(github.ref, 'refs/tags/')` condition. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude Opus 4.5 <[email protected]>
1 parent c86d000 commit 4b36567

File tree

1 file changed

+32
-27
lines changed

1 file changed

+32
-27
lines changed

.github/workflows/test.yml

Lines changed: 32 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -2,22 +2,13 @@ name: test
22

33
on:
44
push:
5+
branches: ['**']
6+
tags: ['**']
57
pull_request:
68

79
jobs:
8-
# Temporarily disabled - macOS runner
9-
# lint:
10-
# runs-on: macos-latest
11-
# steps:
12-
# - uses: actions/checkout@v4
13-
14-
# - name: Install swiftformat
15-
# run: brew install swiftformat
16-
17-
# - name: Lint
18-
# run: swiftformat --lint . --reporter github-actions-log
19-
20-
smoke:
10+
# Linux - runs on every push
11+
linux:
2112
runs-on: ubuntu-latest
2213
steps:
2314
- uses: actions/checkout@v4
@@ -39,20 +30,34 @@ jobs:
3930
- name: Run tests
4031
run: swift test
4132

42-
# Temporarily disabled - macOS runner
43-
# macos:
44-
# runs-on: macos-latest
45-
# steps:
46-
# - uses: actions/checkout@v4
33+
# macOS - only runs on tag pushes (releases)
34+
macos:
35+
runs-on: macos-latest
36+
if: startsWith(github.ref, 'refs/tags/')
37+
steps:
38+
- uses: actions/checkout@v4
4739

48-
# - name: Checkout html5lib-tests
49-
# uses: actions/checkout@v4
50-
# with:
51-
# repository: html5lib/html5lib-tests
52-
# path: html5lib-tests
40+
- name: Checkout html5lib-tests
41+
uses: actions/checkout@v4
42+
with:
43+
repository: html5lib/html5lib-tests
44+
path: html5lib-tests
45+
46+
- name: Build
47+
run: swift build
48+
49+
- name: Run tests
50+
run: swift test
51+
52+
# Lint - only runs on tag pushes (releases)
53+
lint:
54+
runs-on: macos-latest
55+
if: startsWith(github.ref, 'refs/tags/')
56+
steps:
57+
- uses: actions/checkout@v4
5358

54-
# - name: Build
55-
# run: swift build
59+
- name: Install swiftformat
60+
run: brew install swiftformat
5661

57-
# - name: Run tests
58-
# run: swift test
62+
- name: Lint
63+
run: swiftformat --lint . --reporter github-actions-log

0 commit comments

Comments
 (0)