9
9
dbimage :
10
10
- postgres:14
11
11
- postgres:13
12
- - postgres:12
13
12
- postgres:11
14
13
dbauth :
15
14
- trust
@@ -18,69 +17,72 @@ jobs:
18
17
swiftver :
19
18
- swift:5.2
20
19
- swift:5.5
20
+ - swift:5.6
21
21
- swiftlang/swift:nightly-main
22
22
swiftos :
23
23
- focal
24
+ include :
25
+ - swiftver : swift:5.2
26
+ test_flag : --enable-test-discovery
24
27
container : ${{ format('{0}-{1}', matrix.swiftver, matrix.swiftos) }}
25
28
runs-on : ubuntu-latest
26
29
env :
27
30
LOG_LEVEL : debug
28
- POSTGRES_DB_A : ' vapor_database '
29
- POSTGRES_DB_B : ' vapor_database '
30
- POSTGRES_USER_A : ' vapor_username '
31
- POSTGRES_USER_B : ' vapor_username '
32
- POSTGRES_PASSWORD_A : ' vapor_password '
33
- POSTGRES_PASSWORD_B : ' vapor_password '
31
+ POSTGRES_DB_A : ' test_database '
32
+ POSTGRES_DB_B : ' test_database '
33
+ POSTGRES_USER_A : ' test_username '
34
+ POSTGRES_USER_B : ' test_username '
35
+ POSTGRES_PASSWORD_A : ' test_password '
36
+ POSTGRES_PASSWORD_B : ' test_password '
34
37
POSTGRES_HOSTNAME_A : ' psql-a'
35
38
POSTGRES_HOSTNAME_B : ' psql-b'
36
39
POSTGRES_HOST_AUTH_METHOD : ${{ matrix.dbauth }}
37
40
services :
38
41
psql-a :
39
42
image : ${{ matrix.dbimage }}
40
43
env :
41
- POSTGRES_USER : ' vapor_username '
42
- POSTGRES_DB : ' vapor_database '
43
- POSTGRES_PASSWORD : ' vapor_password '
44
+ POSTGRES_USER : ' test_username '
45
+ POSTGRES_DB : ' test_database '
46
+ POSTGRES_PASSWORD : ' test_password '
44
47
POSTGRES_HOST_AUTH_METHOD : ${{ matrix.dbauth }}
45
48
POSTGRES_INITDB_ARGS : --auth-host=${{ matrix.dbauth }}
46
49
psql-b :
47
50
image : ${{ matrix.dbimage }}
48
51
env :
49
- POSTGRES_USER : ' vapor_username '
50
- POSTGRES_DB : ' vapor_database '
51
- POSTGRES_PASSWORD : ' vapor_password '
52
+ POSTGRES_USER : ' test_username '
53
+ POSTGRES_DB : ' test_database '
54
+ POSTGRES_PASSWORD : ' test_password '
52
55
POSTGRES_HOST_AUTH_METHOD : ${{ matrix.dbauth }}
53
56
POSTGRES_INITDB_ARGS : --auth-host=${{ matrix.dbauth }}
54
57
steps :
55
58
- name : Check out package
56
- uses : actions/checkout@v2
59
+ uses : actions/checkout@v3
57
60
- name : Run all tests with Thread Sanitizer
58
- run : swift test --enable-test-discovery --sanitize=thread
61
+ run : swift test ${{ matrix.test_flag }} --sanitize=thread
59
62
60
63
macos-all :
61
64
strategy :
62
65
fail-fast : false
63
66
matrix :
67
+ # Only test latest version and one auth method on macOS
64
68
dbimage :
65
- # Only test the lastest version on macOS, let Linux do the rest
66
69
- postgresql@14
67
70
dbauth :
68
- # Only test one auth method on macOS, Linux tests will cover the others
69
71
- scram-sha-256
70
72
xcode :
71
73
- latest-stable
72
- - latest
74
+ # - latest
73
75
runs-on : macos-11
74
76
env :
75
77
LOG_LEVEL : debug
76
78
POSTGRES_HOSTNAME_A : 127.0.0.1
77
79
POSTGRES_HOSTNAME_B : 127.0.0.1
78
- POSTGRES_USER_A : ' vapor_username '
79
- POSTGRES_USER_B : ' vapor_username '
80
- POSTGRES_PASSWORD_A : ' vapor_password '
81
- POSTGRES_PASSWORD_B : ' vapor_password '
82
- POSTGRES_DB_A : ' vapor_database_a '
83
- POSTGRES_DB_B : ' vapor_database_b '
80
+ POSTGRES_USER_A : ' test_username '
81
+ POSTGRES_USER_B : ' test_username '
82
+ POSTGRES_PASSWORD_A : ' test_password '
83
+ POSTGRES_PASSWORD_B : ' test_password '
84
+ POSTGRES_DB_A : ' test_database_a '
85
+ POSTGRES_DB_B : ' test_database_b '
84
86
steps :
85
87
- name : Select latest available Xcode
86
88
uses : maxim-lobanov/setup-xcode@v1
@@ -100,7 +102,7 @@ jobs:
100
102
psql $POSTGRES_DB_B <<<"ALTER SCHEMA public OWNER TO $POSTGRES_USER_B;"
101
103
timeout-minutes : 2
102
104
- name : Checkout code
103
- uses : actions/checkout@v2
105
+ uses : actions/checkout@v3
104
106
- name : Run all tests with Thread Sanitizer
105
107
run : |
106
108
swift test --sanitize=thread -Xlinker -rpath \
0 commit comments