-
-
Notifications
You must be signed in to change notification settings - Fork 12
52 lines (52 loc) · 1.45 KB
/
ci.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
name: CI
on:
- push
jobs:
xenial:
container:
image: vapor3/swift:5.2-xenial
services:
psql:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: steampress
POSTGRES_DB: steampress-test
POSTGRES_PASSWORD: password
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- run: swift test --enable-test-discovery --enable-code-coverage
env:
DATABASE_HOSTNAME: psql
DATABASE_PORT: 5432
bionic:
container:
image: vapor3/swift:5.2-bionic
services:
psql:
image: postgres
ports:
- 5432:5432
env:
POSTGRES_USER: steampress
POSTGRES_DB: steampress-test
POSTGRES_PASSWORD: password
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: Run Bionic Tests
run: swift test --enable-test-discovery --enable-code-coverage
env:
DATABASE_HOSTNAME: psql
DATABASE_PORT: 5432
- name: Setup container for codecov upload
run: apt-get update && apt-get install curl -y
- name: Process coverage file
run: llvm-cov show .build/x86_64-unknown-linux-gnu/debug/SteamPressExamplePackageTests.xctest -instr-profile=.build/debug/codecov/default.profdata > coverage.txt
- name: Upload code coverage
uses: codecov/codecov-action@v1
with:
token: ${{ secrets.CODECOV_UPLOAD_KEY }}
file: coverage.txt