generated from element-hq/.github
-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (48 loc) · 1.67 KB
/
tests.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
name: Tests
on:
push:
branches: ["main"]
pull_request:
jobs:
demo:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup | Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
run: |
(cd web && yarn install && yarn build)
go build ./cmd/chaos
- name: Run Demo
run: |
docker compose build --build-arg "UID=$UID"
docker compose up -d
curl --head -k -XGET --retry 20 --retry-all-errors --retry-delay 1 https://localhost:4051/_matrix/client/versions
curl --head -k -XGET --retry 20 --retry-all-errors --retry-delay 1 https://localhost:4052/_matrix/client/versions
./chaos -config config.demo.yaml -timeout_secs 25
- name: Cleanup
if: always()
run: |
ls -alh ./demo/data/hs2
docker compose logs
docker compose down -t 1 --remove-orphans
tests:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup | Go
uses: actions/setup-go@v4
with:
go-version: '1.21'
- name: Build
# avoids dependency on building web files: we do this for the demo already.
run: |
mkdir -p ./web/dist && touch ./web/dist/blank.txt
go build ./cmd/chaos
- name: Vet
run: go vet ./...
- name: Test
run: go test ./...