-
Notifications
You must be signed in to change notification settings - Fork 1
27 lines (24 loc) · 1010 Bytes
/
Copy pathci.yml
File metadata and controls
27 lines (24 loc) · 1010 Bytes
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
name: CI
on: [push, pull_request]
jobs:
test:
strategy:
matrix:
os: [macos-latest, ubuntu-latest]
runs-on: ${{matrix.os}}
steps:
- uses: actions/checkout@v2
- name: Tests
run: swift test --enable-code-coverage
- name: codecov
run: |
os=$(echo "${{ matrix.os }}" | cut -f1 -d"-")
if [ "$os" = "ubuntu" ]; then
sudo ln -s /usr/lib/llvm-9/bin/llvm-cov /usr/local/bin/llvm-cov
object=".build/debug/ComposePackageTests.xctest"
elif [ "$os" = "macos" ]; then
sudo ln -s /Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/llvm-cov /usr/local/bin/llvm-cov
object=".build/debug/ComposePackageTests.xctest/Contents/MacOS/ComposePackageTests"
fi
llvm-cov export -format="lcov" --object "$object" -instr-profile .build/debug/codecov/default.profdata > info.lcov
bash <(curl https://codecov.io/bash) -cF "$os"