-
Notifications
You must be signed in to change notification settings - Fork 0
33 lines (29 loc) · 997 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
name: Swift
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
jobs:
build-and-test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Link SourceKit in correct search path
run: sudo ln -s /usr/share/swift/usr/lib/libsourcekitdInProc.so /usr/lib/libsourcekitdInProc.so
- name: Install LLVM
run: sudo apt-get install -y llvm-10
- name: Build
run: swift build -v
- name: Generate LinuxMain.swift
run: swift test --generate-linuxmain
- name: Run tests
run: swift test --enable-code-coverage -v
- name: Covert Swift coverage report to lcov
run: llvm-cov-10 export -format="lcov" .build/debug/SettlerPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata > ./coverage.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}
file: ./coverage.lcov
fail_ci_if_error: true