-
Notifications
You must be signed in to change notification settings - Fork 4
32 lines (30 loc) · 920 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
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
build:
runs-on: macos-14
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.3'
- uses: actions/checkout@v4
- name: SwiftLint install
run: brew install swiftlint
- name: SwiftLint
run: swiftlint lint --strict
- name: SwiftFormat
run: 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 }}