Skip to content

Commit 37890ce

Browse files
chore: Moves test and clarifies naming
1 parent e7ecdd0 commit 37890ce

File tree

1 file changed

+30
-32
lines changed

1 file changed

+30
-32
lines changed

.github/workflows/build.yml

Lines changed: 30 additions & 32 deletions
Original file line numberDiff line numberDiff line change
@@ -34,29 +34,33 @@ jobs:
3434
- name: Build and test
3535
run: swift test --parallel --enable-test-discovery
3636

37-
# ubuntu-latest is ubuntu-22.04 currently. Swift versions older than 5.7 don't have builds for 22.04. https://www.swift.org/download/
38-
ubuntu-20_04:
39-
name: Test Swift ${{ matrix.swift }} on ${{ matrix.os }}
40-
runs-on: ${{ matrix.os }}
41-
strategy:
42-
matrix:
43-
os: [ubuntu-20.04]
44-
swift: ["5.5", "5.6"]
37+
linux:
38+
name: Test on Linux
39+
runs-on: ubuntu-latest
4540
steps:
4641
- uses: swift-actions/setup-swift@v1
47-
with:
48-
swift-version: ${{ matrix.swift }}
4942
- uses: actions/checkout@v3
5043
- name: Test
51-
run: swift test --parallel
44+
run: swift test --parallel --enable-code-coverage
45+
- name: Get test coverage html
46+
run: |
47+
llvm-cov show \
48+
$(swift build --show-bin-path)/GraphQLPackageTests.xctest \
49+
--instr-profile $(swift build --show-bin-path)/codecov/default.profdata \
50+
--format html \
51+
--output-dir=.test-coverage
52+
- name: Upload test coverage html
53+
uses: actions/upload-artifact@v3
54+
with:
55+
name: test-coverage-report
56+
path: .test-coverage
5257

53-
ubuntu-22_04:
54-
name: Test Swift ${{ matrix.swift }} on ${{ matrix.os }}
55-
runs-on: ${{ matrix.os }}
58+
backcompat-ubuntu-22_04:
59+
name: Test Swift ${{ matrix.swift }} on Ubuntu 22.04
60+
runs-on: ubuntu-22.04
5661
strategy:
5762
matrix:
58-
os: [ubuntu-latest]
59-
swift: ["5.7", "5.8", "5.9"]
63+
swift: ["5.7", "5.8"]
6064
steps:
6165
- uses: swift-actions/setup-swift@v1
6266
with:
@@ -65,23 +69,17 @@ jobs:
6569
- name: Test
6670
run: swift test --parallel
6771

68-
ubuntu-latest:
69-
name: Test Latest Swift on Latest Ubuntu
70-
runs-on: ubuntu-latest
72+
# Swift versions older than 5.7 don't have builds for 22.04. https://www.swift.org/download/
73+
backcompat-ubuntu-20_04:
74+
name: Test Swift ${{ matrix.swift }} on Ubuntu 20.04
75+
runs-on: ubuntu-20.04
76+
strategy:
77+
matrix:
78+
swift: ["5.5", "5.6"]
7179
steps:
7280
- uses: swift-actions/setup-swift@v1
81+
with:
82+
swift-version: ${{ matrix.swift }}
7383
- uses: actions/checkout@v3
7484
- name: Test
75-
run: swift test --parallel --enable-code-coverage
76-
- name: Get test coverage html
77-
run: |
78-
llvm-cov show \
79-
$(swift build --show-bin-path)/GraphQLPackageTests.xctest \
80-
--instr-profile $(swift build --show-bin-path)/codecov/default.profdata \
81-
--format html \
82-
--output-dir=.test-coverage
83-
- name: Upload test coverage html
84-
uses: actions/upload-artifact@v3
85-
with:
86-
name: test-coverage-report
87-
path: .test-coverage
85+
run: swift test --parallel

0 commit comments

Comments
 (0)