Skip to content

Commit b40fc9b

Browse files
Merge pull request #16 from NeedleInAJayStack/build/ci
build: Improves CI
2 parents bac8535 + 4347029 commit b40fc9b

File tree

1 file changed

+34
-14
lines changed

1 file changed

+34
-14
lines changed

.github/workflows/test.yml

Lines changed: 34 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,23 +1,43 @@
1-
name: test
1+
name: Test
2+
23
on:
34
pull_request:
45
push: { branches: [ main ] }
56

7+
env:
8+
PACKAGE_PATH: ${{ inputs.package_path != '' && format('--package-path={0}', inputs.package_path) || '' }}
9+
610
jobs:
7-
macos-test:
11+
macos:
12+
name: Test on macOS
813
runs-on: macos-latest
914
steps:
10-
- uses: maxim-lobanov/setup-xcode@v1
11-
with:
12-
xcode-version: latest
13-
- uses: actions/checkout@v4
14-
- name: Darwin build & test
15-
run: swift test --enable-all-traits --skip IntegrationTests
16-
linux-test:
15+
- uses: maxim-lobanov/setup-xcode@v1
16+
with:
17+
xcode-version: latest-stable
18+
- uses: actions/checkout@v4
19+
- name: Build and test
20+
run: |
21+
swift test \
22+
--parallel \
23+
--enable-all-traits \
24+
--skip IntegrationTests
25+
26+
linux:
27+
name: Test on Linux - ${{ matrix.swift-image }}
28+
strategy:
29+
matrix:
30+
swift-image:
31+
- "swift:6.1-jammy"
32+
- "swift:6.1-noble"
1733
runs-on: ubuntu-latest
18-
container:
19-
image: swift:latest
34+
container: ${{ matrix.swift-image }}
2035
steps:
21-
- uses: actions/checkout@v4
22-
- name: Linux build & test
23-
run: swift test --traits ClientNIO,ServerVapor --skip IntegrationTests
36+
- name: Checkout
37+
uses: actions/checkout@v4
38+
- name: Test
39+
run: |
40+
swift test \
41+
--parallel \
42+
--traits ClientNIO,ServerVapor \
43+
--skip IntegrationTests

0 commit comments

Comments
 (0)