1
1
name : CI
2
2
3
3
on :
4
- push :
5
- branches :
6
- - main
7
- paths :
8
- - " **.swift"
9
- - " **.yml"
10
- pull_request :
11
- workflow_dispatch :
4
+ push :
5
+ branches :
6
+ - main
7
+ paths :
8
+ - ' **.swift'
9
+ - ' **.yml'
10
+ pull_request :
11
+ workflow_dispatch :
12
12
concurrency :
13
- group : ${{ github.workflow }}-${{ github.ref }}-ci
14
- cancel-in-progress : true
13
+ group : ${{ github.workflow }}-${{ github.ref }}-ci
14
+ cancel-in-progress : true
15
15
16
16
jobs :
17
- linux :
18
- runs-on : ubuntu-latest
19
- timeout-minutes : 15
20
- strategy :
21
- matrix :
22
- image :
23
- - " swift:5.10"
24
- - " swift:6.0"
25
- - " swift:6.1"
26
- postgres-image :
27
- - " postgres:17"
28
- - " postgres:16"
29
- - " postgres:14"
30
- include :
31
- - postgres-image : postgres:17
32
- postgres-auth : scram-sha-256
33
- - postgres-image : postgres:16
34
- postgres-auth : scram-sha-256
35
- - postgres-image : postgres:14
36
- postgres-auth : md5
37
- container :
38
- image : ${{ matrix.image }}
39
- volumes : ["pgrunshare:/var/run/postgresql"]
17
+ linux :
18
+ runs-on : ubuntu-latest
19
+ timeout-minutes : 15
20
+ strategy :
21
+ matrix :
22
+ image :
23
+ - ' swift:5.10'
24
+ - ' swift:6.0'
25
+ - ' swift:6.1'
26
+ postgres-image :
27
+ - ' postgres:17'
28
+ - ' postgres:16'
29
+ - ' postgres:14'
30
+ include :
31
+ - postgres-image : postgres:17
32
+ postgres-auth : scram-sha-256
33
+ - postgres-image : postgres:16
34
+ postgres-auth : scram-sha-256
35
+ - postgres-image : postgres:14
36
+ postgres-auth : md5
37
+ container :
38
+ image : ${{ matrix.image }}
39
+ volumes : [ 'pgrunshare:/var/run/postgresql' ]
40
+ env :
41
+ POSTGRES_DB : ' test_database'
42
+ POSTGRES_USER : ' test_user'
43
+ POSTGRES_PASSWORD : ' test_password'
44
+ POSTGRES_HOSTNAME : ' psql'
45
+ POSTGRES_SOCKET : ' /var/run/postgresql/.s.PGSQL.5432'
46
+ POSTGRES_HOST_AUTH_METHOD : ${{ matrix.postgres-auth }}
47
+ services :
48
+ psql :
49
+ image : ${{ matrix.postgres-image }}
50
+ volumes : [ 'pgrunshare:/var/run/postgresql' ]
40
51
env :
41
- POSTGRES_DB : " test_database"
42
- POSTGRES_USER : " test_user"
43
- POSTGRES_PASSWORD : " test_password"
44
- POSTGRES_HOSTNAME : " psql"
45
- POSTGRES_SOCKET : " /var/run/postgresql/.s.PGSQL.5432"
46
- POSTGRES_HOST_AUTH_METHOD : ${{ matrix.postgres-auth }}
47
- services :
48
- psql :
49
- image : ${{ matrix.postgres-image }}
50
- volumes : ["pgrunshare:/var/run/postgresql"]
51
- env :
52
- POSTGRES_DB : " test_database"
53
- POSTGRES_USER : " test_user"
54
- POSTGRES_PASSWORD : " test_password"
55
- POSTGRES_HOST_AUTH_METHOD : ${{ matrix.postgres-auth }}
56
- POSTGRES_INITDB_ARGS : --auth-host=${{ matrix.postgres-auth }}
57
- steps :
58
- - name : Checkout
59
- uses : actions/checkout@v4
60
- - name : Test
61
- run : |
62
- swift test --enable-code-coverage
63
- - name : Convert coverage files
64
- run : |
65
- llvm-cov export -format="lcov" \
66
- .build/debug/swift-jobs-postgresPackageTests.xctest \
67
- -ignore-filename-regex="\/Tests\/" \
68
- -ignore-filename-regex="\/Benchmarks\/" \
69
- -instr-profile .build/debug/codecov/default.profdata > info.lcov
70
- - name : Upload to codecov.io
71
- uses : codecov/codecov-action@v4
72
- with :
73
- files : info.lcov
74
- token : ${{ secrets.CODECOV_TOKEN }}
52
+ POSTGRES_DB : ' test_database'
53
+ POSTGRES_USER : ' test_user'
54
+ POSTGRES_PASSWORD : ' test_password'
55
+ POSTGRES_HOST_AUTH_METHOD : ${{ matrix.postgres-auth }}
56
+ POSTGRES_INITDB_ARGS : --auth-host=${{ matrix.postgres-auth }}
57
+ steps :
58
+ - name : Checkout
59
+ uses : actions/checkout@v4
60
+ - name : Test
61
+ run : |
62
+ swift test --enable-code-coverage
63
+ - name : Convert coverage files
64
+ run : |
65
+ llvm-cov export -format="lcov" \
66
+ .build/debug/swift-jobs-postgresPackageTests.xctest \
67
+ -ignore-filename-regex="\/Tests\/" \
68
+ -ignore-filename-regex="\/Benchmarks\/" \
69
+ -instr-profile .build/debug/codecov/default.profdata > info.lcov
70
+ - name : Upload to codecov.io
71
+ uses : codecov/codecov-action@v4
72
+ with :
73
+ files : info.lcov
74
+ token : ${{ secrets.CODECOV_TOKEN }}
0 commit comments