Skip to content

Commit 2130b31

Browse files
committed
ci: have a dedicated job to test platform specific tests
This change adds another job to the CI which can will test on platforms other than ubuntu-latest. At the moment it's only testing macos-latest with the fetcher tests but can be expanded in either direction. Signed-off-by: crozzy <joseph.crosland@gmail.com>
1 parent 92e393f commit 2130b31

File tree

1 file changed

+20
-1
lines changed

1 file changed

+20
-1
lines changed

.github/workflows/main.yml

Lines changed: 20 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -110,7 +110,7 @@ jobs:
110110
printf '%s/%s/actions/runs/%s/attempts/%s\n'\
111111
"${GITHUB_SERVER_URL}" "${GITHUB_REPOSITORY}" "${GITHUB_RUN_ID}" "${GITHUB_RUN_ATTEMPT}"\
112112
> ~/ok-by-run
113-
find . -name .git -prune -o -name testdata -prune -o -name go.mod -printf '%h\n' |
113+
find . -name .git -prune -o -name testdata -prune -o -name go.mod -print | xargs -n1 dirname |
114114
while read -r dir; do (
115115
cd "$dir"
116116
go list -m
@@ -133,3 +133,22 @@ jobs:
133133
sudo journalctl --unit postgresql.service --boot -0
134134
ls /var/log/postgresql/postgresql-*.log
135135
sudo cat /var/log/postgresql/postgresql-*.log
136+
137+
platform-tests:
138+
name: Platform Tests
139+
runs-on: ${{ matrix.os }}
140+
strategy:
141+
fail-fast: false
142+
matrix:
143+
os:
144+
- macos-latest
145+
steps:
146+
- name: Checkout
147+
uses: actions/checkout@v6
148+
with:
149+
persist-credentials: false
150+
- uses: actions/setup-go@v6
151+
with:
152+
go-version: stable
153+
- name: Test Fetcher
154+
run: go test -race -v -run TestFetch ./libindex/

0 commit comments

Comments
 (0)