-
Notifications
You must be signed in to change notification settings - Fork 38
98 lines (86 loc) · 2.56 KB
/
dmr-test-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
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
name: DMR test CI config
on:
push:
branches: [ "dmr/oidc-in-ci" ]
permissions:
packages: read
jobs:
end_to_end:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:13-alpine
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: syncv3
ports:
- 5432:5432
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
steps:
- uses: actions/checkout@v3
- name: Install Go
uses: actions/setup-go@v4
with:
go-version: 1.19
- name: Build
run: go build ./cmd/syncv3
- name: Set up gotestfmt
uses: GoTestTools/gotestfmt-action@v2
with:
token: ${{ secrets.GITHUB_TOKEN }}
- name: Declare Python dependencies
run: echo "matrix-synapse==1.90.0" > requirements.txt
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: 3.11
cache: 'pip'
cache-dependency-path: 'tests-e2e/synapse-requirements.txt'
- name: Install Synapse
run: |
pip install -r tests-e2e/synapse-requirements.txt
pip list
- name: Configure Synapse
shell: bash
run: |
mkdir synapse
echo <<EOF
server_name: "exampledomain"
listeners:
- port: 8008
type: http
bind_addresses: ['::1', '127.0.0.1']
resources:
- names: [client]
database:
name: sqlite3
args:
database: synapse/homeserver.db
suppress_key_server_warning: true
report_stats: false
EOF > synapse/homeserver.config
- name: Run end-to-end tests
run: |
set -euo pipefail
./run-tests-dmr-test.sh -count=1 -v -json . 2>&1 | tee test-e2e-runner.log | gotestfmt -hide all
working-directory: tests-e2e
shell: bash
env:
SYNCV3_DB: user=postgres dbname=syncv3 sslmode=disable password=postgres host=localhost
SYNCV3_SERVER: http://localhost:8008
SYNCV3_SECRET: itsasecret
E2E_TEST_SERVER_STDOUT: test-e2e-server.log
- name: Upload test log
uses: actions/upload-artifact@v3
if: always()
with:
name: E2E test logs
path: |
./tests-e2e/test-e2e-runner.log
./tests-e2e/test-e2e-server.log
if-no-files-found: error