Skip to content

Commit 79f057f

Browse files
chore: Moves code coverage to latest ubuntu
1 parent 62ead02 commit 79f057f

File tree

1 file changed

+26
-16
lines changed

1 file changed

+26
-16
lines changed

.github/workflows/build.yml

Lines changed: 26 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -32,21 +32,10 @@ jobs:
3232
xcode-version: latest
3333
- uses: actions/checkout@v3
3434
- name: Build and test
35-
run: swift test --parallel --enable-test-discovery --enable-code-coverage
36-
- name: Get test coverage html
37-
run: llvm-cov show \
38-
.build/x86_64-apple-macosx/debug/GraphitiPackageTests.xctest/Contents/MacOS/GraphitiPackageTests \
39-
--instr-profile .build/x86_64-apple-macosx/debug/codecov/default.profdata \
40-
--format html \
41-
--output-dir=.test-coverage
42-
- name: Upload test coverage html
43-
uses: actions/upload-artifact@v2
44-
with:
45-
name: test-coverage-report
46-
path: .test-coverage
35+
run: swift test --parallel --enable-test-discovery
4736

48-
# 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/
49-
ubuntu-old:
37+
# Swift versions older than 5.7 don't have builds for ubuntu 22.04. https://www.swift.org/download/
38+
ubuntu-20_04:
5039
name: Build ${{ matrix.swift }} on ${{ matrix.os }}
5140
runs-on: ${{ matrix.os }}
5241
strategy:
@@ -61,12 +50,12 @@ jobs:
6150
- name: Test
6251
run: swift test --parallel
6352

64-
ubuntu-latest:
53+
ubuntu-22_04:
6554
name: Build ${{ matrix.swift }} on ${{ matrix.os }}
6655
runs-on: ${{ matrix.os }}
6756
strategy:
6857
matrix:
69-
os: [ubuntu-latest]
58+
os: [ubuntu-22.04]
7059
swift: ["5.7"]
7160
steps:
7261
- uses: swift-actions/setup-swift@v1
@@ -75,3 +64,24 @@ jobs:
7564
- uses: actions/checkout@v3
7665
- name: Test
7766
run: swift test --parallel
67+
68+
ubuntu-latest:
69+
name: Build latest on ubuntu
70+
runs-on: ubuntu-latest
71+
steps:
72+
- uses: swift-actions/setup-swift@v1
73+
- uses: actions/checkout@v3
74+
- 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

0 commit comments

Comments
 (0)