-
-
Notifications
You must be signed in to change notification settings - Fork 3
34 lines (29 loc) · 832 Bytes
/
tests.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
name: Tests
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]
jobs:
test:
container:
image: swift:5.9-jammy
runs-on: ubuntu-latest
services:
loki:
image: grafana/loki:3.0.0
steps:
- uses: actions/checkout@v3
- name: Build
run: swift build
- name: Run tests
run: swift test --enable-code-coverage
env:
XCT_LOKI_URL: http://loki:3100
- name: Prepare Code Coverage
run: llvm-cov export -format="lcov" .build/debug/swift-log-lokiPackageTests.xctest -instr-profile .build/debug/codecov/default.profdata -ignore-filename-regex="\.pb\.swift" > info.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: info.lcov