@@ -34,29 +34,33 @@ jobs:
34
34
- name : Build and test
35
35
run : swift test --parallel --enable-test-discovery
36
36
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
45
40
steps :
46
41
- uses : swift-actions/setup-swift@v1
47
- with :
48
- swift-version : ${{ matrix.swift }}
49
42
- uses : actions/checkout@v3
50
43
- 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
52
57
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
56
61
strategy :
57
62
matrix :
58
- os : [ubuntu-latest]
59
- swift : ["5.7", "5.8", "5.9"]
63
+ swift : ["5.7", "5.8"]
60
64
steps :
61
65
- uses : swift-actions/setup-swift@v1
62
66
with :
@@ -65,23 +69,17 @@ jobs:
65
69
- name : Test
66
70
run : swift test --parallel
67
71
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"]
71
79
steps :
72
80
- uses : swift-actions/setup-swift@v1
81
+ with :
82
+ swift-version : ${{ matrix.swift }}
73
83
- uses : actions/checkout@v3
74
84
- 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