-
Notifications
You must be signed in to change notification settings - Fork 9
51 lines (51 loc) · 2 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
on: push
name: Tests
jobs:
local-setup:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Setup Docker'
uses: docker-practice/actions-setup-docker@master
- 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: '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
prod-setup:
runs-on: ubuntu-latest
steps:
- name: 'Checkout code'
uses: actions/checkout@v4
- name: 'Setup Docker'
uses: docker-practice/actions-setup-docker@master
- 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: 'Start reverse proxy with local 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