@@ -43,15 +43,26 @@ jobs:
43
43
uses : ./.github/actions/setup
44
44
- name : run migrations
45
45
run : poetry run python -m lifecycle.migrate
46
+ test-make-seed :
47
+ runs-on : ubuntu-latest
48
+ steps :
49
+ - id : seed
50
+ run : |
51
+ echo "seed=$(printf "%d\n" "0x$(openssl rand -hex 4)")" >> "$GITHUB_OUTPUT"
52
+ outputs :
53
+ seed : ${{ steps.seed.outputs.seed }}
46
54
test-migrations-from-stable :
47
- name : test-migrations-from-stable - PostgreSQL ${{ matrix.psql }}
55
+ name : test-migrations-from-stable - PostgreSQL ${{ matrix.psql }} - Run ${{ matrix.run_id }}/5
48
56
runs-on : ubuntu-latest
57
+ timeout-minutes : 20
58
+ needs : test-make-seed
49
59
strategy :
50
60
fail-fast : false
51
61
matrix :
52
62
psql :
53
63
- 15-alpine
54
64
- 16-alpine
65
+ run_id : [1, 2, 3, 4, 5]
55
66
steps :
56
67
- uses : actions/checkout@v4
57
68
with :
@@ -93,28 +104,36 @@ jobs:
93
104
env :
94
105
# Test in the main database that we just migrated from the previous stable version
95
106
AUTHENTIK_POSTGRESQL__TEST__NAME : authentik
107
+ CI_TEST_SEED : ${{ needs.test-make-seed.outputs.seed }}
108
+ CI_RUN_ID : ${{ matrix.run_id }}
109
+ CI_TOTAL_RUNS : " 5"
96
110
run : |
97
- poetry run make test
111
+ poetry run make ci- test
98
112
test-unittest :
99
- name : test-unittest - PostgreSQL ${{ matrix.psql }}
113
+ name : test-unittest - PostgreSQL ${{ matrix.psql }} - Run ${{ matrix.run_id }}/5
100
114
runs-on : ubuntu-latest
101
- timeout-minutes : 30
115
+ timeout-minutes : 20
116
+ needs : test-make-seed
102
117
strategy :
103
118
fail-fast : false
104
119
matrix :
105
120
psql :
106
121
- 15-alpine
107
122
- 16-alpine
123
+ run_id : [1, 2, 3, 4, 5]
108
124
steps :
109
125
- uses : actions/checkout@v4
110
126
- name : Setup authentik env
111
127
uses : ./.github/actions/setup
112
128
with :
113
129
postgresql_version : ${{ matrix.psql }}
114
130
- name : run unittest
131
+ env :
132
+ CI_TEST_SEED : ${{ needs.test-make-seed.outputs.seed }}
133
+ CI_RUN_ID : ${{ matrix.run_id }}
134
+ CI_TOTAL_RUNS : " 5"
115
135
run : |
116
- poetry run make test
117
- poetry run coverage xml
136
+ poetry run make ci-test
118
137
- if : ${{ always() }}
119
138
uses : codecov/codecov-action@v5
120
139
with :
0 commit comments