24
24
run : docker run --rm -v ${{ github.workspace }}:/repo ghcr.io/nicklockwood/swiftformat:latest /repo --lint
25
25
26
26
macos :
27
- name : Build and test on macOS
27
+ name : Test on macOS
28
28
runs-on : macOS-latest
29
29
steps :
30
30
- uses : maxim-lobanov/setup-xcode@v1
@@ -34,28 +34,33 @@ jobs:
34
34
- name : Build and test
35
35
run : swift test --parallel --enable-test-discovery
36
36
37
- # Swift versions older than 5.7 don't have builds for ubuntu 22.04. https://www.swift.org/download/
38
- ubuntu-20_04 :
39
- name : Build ${{ matrix.swift }} on ${{ matrix.os }}
40
- runs-on : ${{ matrix.os }}
41
- strategy :
42
- matrix :
43
- os : [ubuntu-20.04]
44
- swift : ["5.4", "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)/GraphitiPackageTests.xctest \
49
+ --instr-profile $(swift build --show-bin-path)/codecov/default.profdata \
50
+ --ignore-filename-regex="\.build|Tests" \
51
+ --format html \
52
+ --output-dir=.test-coverage
53
+ - name : Upload test coverage html
54
+ uses : actions/upload-artifact@v3
55
+ with :
56
+ name : test-coverage-report
57
+ path : .test-coverage
52
58
53
- ubuntu-22_04 :
54
- name : Build ${{ matrix.swift }} on ${{ matrix.os }}
55
- runs-on : ${{ matrix.os }}
59
+ backcompat- ubuntu-22_04 :
60
+ name : Test Swift ${{ matrix.swift }} on Ubuntu 22.04
61
+ runs-on : ubuntu-22.04
56
62
strategy :
57
63
matrix :
58
- os : [ubuntu-22.04]
59
64
swift : ["5.7"]
60
65
steps :
61
66
- uses : swift-actions/setup-swift@v1
@@ -65,23 +70,17 @@ jobs:
65
70
- name : Test
66
71
run : swift test --parallel
67
72
68
- ubuntu-latest :
69
- name : Build latest on ubuntu
70
- runs-on : ubuntu-latest
73
+ # Swift versions older than 5.7 don't have builds for ubuntu 22.04. https://www.swift.org/download/
74
+ backcompat-ubuntu-20_04 :
75
+ name : Test Swift ${{ matrix.swift }} on Ubuntu 20.04
76
+ runs-on : ubuntu-20.04
77
+ strategy :
78
+ matrix :
79
+ swift : ["5.4", "5.5", "5.6"]
71
80
steps :
72
81
- uses : swift-actions/setup-swift@v1
82
+ with :
83
+ swift-version : ${{ matrix.swift }}
73
84
- uses : actions/checkout@v3
74
85
- 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)/GraphitiPackageTests.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
86
+ run : swift test --parallel
0 commit comments