-
Notifications
You must be signed in to change notification settings - Fork 4
36 lines (34 loc) · 1002 Bytes
/
swift.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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-latest
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '16.1'
- uses: actions/checkout@v4
- name: SwiftLint install
run: brew install swiftlint
- name: SwiftLint
run: |
swiftlint --version
swiftlint lint --strict
- name: SwiftFormat
run: |
swiftformat --version
swiftformat --lint .
- name: Run tests
run: swift test --enable-code-coverage -v --filter YorkieUnitTests
- name: Prepare Code Coverage
run: xcrun llvm-cov export -format="lcov" .build/debug/YorkiePackageTests.xctest/Contents/MacOS/YorkiePackageTests -instr-profile .build/debug/codecov/default.profdata > lcov.info
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v4
with:
file: lcov.info
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}