-
Notifications
You must be signed in to change notification settings - Fork 1
38 lines (34 loc) · 1013 Bytes
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
name: ci
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
env:
LCOV_PATH: .build/artifacts/info.lcov
BUILD_FOLDER: .build/debug/PhantomKitPackageTests.xctest/Contents/MacOS/PhantomKitPackageTests
PROFDATA_FOLDER: .build/debug/codecov/default.profdata
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: SwiftLint
uses: norio-nomura/action-swiftlint@3.2.1
test:
runs-on: macos-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Test
run: |
swift test --enable-code-coverage
xcrun llvm-cov report $BUILD_FOLDER -instr-profile $PROFDATA_FOLDER
xcrun llvm-cov export -format="lcov" $BUILD_FOLDER -instr-profile $PROFDATA_FOLDER > $LCOV_PATH
- name: Upload Coverage Data
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ${{ env.LCOV_PATH }}
fail_ci_if_error: true