-
Notifications
You must be signed in to change notification settings - Fork 11
64 lines (63 loc) · 2.46 KB
/
tests.yml
File metadata and controls
64 lines (63 loc) · 2.46 KB
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
on: push
name: Tests
jobs:
local-setup:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v6
- name: 'Setup Docker'
uses: docker/setup-docker-action@v5
- name: 'Debug versions'
run: |
docker --version
- name: 'Add hosts to /etc/hosts'
run: |
sudo echo "127.0.0.1 reverse-proxy.test" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 hello-world.test" | sudo tee -a /etc/hosts
- name: 'Copy configuration files'
run: cp -r configs-local configs
- name: 'Create empty certificate files'
run: |
echo "{}" > certificates/acme.json
chmod 600 certificates/acme.json
- name: 'Start reverse proxy with local setup'
run: docker compose -f docker-compose.local.yml up -d --wait
- name: 'Test dashboard'
run: curl http://reverse-proxy.test/dashboard/#/
- name: 'Start hello-world example'
run: cd examples && docker compose -f docker-compose.local.yml up -d
- name: 'Test hello-world'
run: curl http://hello-world.test
- name: 'Output logs'
run: docker compose -f docker-compose.prod.yml logs
prod-setup:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v6
- name: 'Setup Docker'
uses: docker/setup-docker-action@v5
- name: 'Debug versions'
run: |
docker --version
- name: 'Add hosts to /etc/hosts'
run: |
sudo echo "127.0.0.1 reverse-proxy.test" | sudo tee -a /etc/hosts
sudo echo "127.0.0.1 hello-world.test" | sudo tee -a /etc/hosts
- name: 'Copy configuration files'
run: cp -r configs-prod configs
- name: 'Create empty certificate files'
run: |
echo "{}" > certificates/acme.json
chmod 600 certificates/acme.json
- name: 'Start reverse proxy with production setup'
run: docker compose -f docker-compose.prod.yml up -d --wait
- name: 'Test dashboard'
run: curl http://reverse-proxy.test/dashboard/#/
- name: 'Start hello-world example'
run: cd examples && docker compose -f docker-compose.prod.yml up -d
- name: 'Test hello-world'
run: curl http://hello-world.test
- name: 'Output logs'
run: docker compose -f docker-compose.prod.yml logs