Skip to content

Commit e01528b

Browse files
committed
Add CI
1 parent 903c5b3 commit e01528b

1 file changed

Lines changed: 60 additions & 0 deletions

File tree

‎.github/workflows/ci.yml‎

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
name: CI
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
release:
11+
types: [published]
12+
13+
jobs:
14+
macos:
15+
runs-on: macOS-latest
16+
steps:
17+
- name: Checkout
18+
uses: actions/checkout@v1
19+
with:
20+
fetch-depth: 1
21+
- name: SPM tests
22+
run: swift test --enable-code-coverage --sanitize=thread
23+
- name: Convert coverage files
24+
run: |
25+
xcrun llvm-cov export -format "lcov" \
26+
.build/debug/jmespath.swiftPackageTests.xctest/Contents/MacOs/jmespath.swiftPackageTests \
27+
-ignore-filename-regex="\/Tests\/" \
28+
-instr-profile=.build/debug/codecov/default.profdata > info.lcov
29+
- name: Upload to codecov.io
30+
uses: codecov/codecov-action@v1
31+
with:
32+
file: info.lcov
33+
34+
linux:
35+
runs-on: ubuntu-latest
36+
strategy:
37+
matrix:
38+
tag:
39+
- swift:5.1
40+
- swift:5.3
41+
- swift:5.4
42+
container:
43+
image: ${{ matrix.tag }}
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v1
47+
with:
48+
fetch-depth: 1
49+
- name: Test
50+
run: swift test --enable-test-discovery --enable-code-coverage --sanitize=thread
51+
- name: Convert coverage files
52+
run: |
53+
llvm-cov export -format="lcov" \
54+
.build/debug/jmespath.swiftPackageTests.xctest \
55+
-ignore-filename-regex="\/Tests\/" \
56+
-instr-profile .build/debug/codecov/default.profdata > info.lcov
57+
- name: Upload to codecov.io
58+
uses: codecov/codecov-action@v1
59+
with:
60+
file: info.lcov

0 commit comments

Comments
 (0)