77 name : Check that Souin build as caddy module
88 runs-on : ubuntu-latest
99 steps :
10- - name : Add domain.com host to /etc/hosts
10+ -
11+ name : Add domain.com host to /etc/hosts
1112 run : |
1213 sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts
13- - name : Install Go
14+ -
15+ name : Install Go
1416 uses : actions/setup-go@v2
1517 with :
1618 go-version : 1.16
17- - name : Checkout code
19+ -
20+ name : Checkout code
1821 uses : actions/checkout@v2
19- - name : Install xcaddy
22+ -
23+ name : Install xcaddy
2024 run : |
2125 sudo apt install -y debian-keyring debian-archive-keyring apt-transport-https
2226 curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/gpg.key' | sudo apt-key add -
2327 curl -1sLf 'https://dl.cloudsmith.io/public/caddy/xcaddy/debian.deb.txt' | sudo tee /etc/apt/sources.list.d/caddy-xcaddy.list
2428 sudo apt update
2529 sudo apt install xcaddy
26- - name : Build Souin as caddy module
30+ -
31+ name : Build Souin as caddy module
2732 run : cd plugins/caddy && xcaddy build --with github.com/darkweak/souin/plugins/caddy=./ --with github.com/darkweak/souin@latest=../..
28- - name : Run detached caddy
33+ -
34+ name : Run detached caddy
2935 run : cd plugins/caddy && ./caddy run &
30- - name : Run Caddy E2E tests
36+ -
37+ name : Run Caddy E2E tests
3138 uses : anthonyvscode/newman-action@v1
3239 with :
3340 collection : " docs/e2e/Souin E2E.postman_collection.json"
@@ -38,27 +45,34 @@ jobs:
3845 name : Check that Souin build as Tyk middleware
3946 runs-on : ubuntu-latest
4047 steps :
41- - name : Install Go
48+ -
49+ name : Install Go
4250 uses : actions/setup-go@v2
4351 with :
4452 go-version : 1.16
45- - name : Checkout code
53+ -
54+ name : Checkout code
4655 uses : actions/checkout@v2
47- - name : Build Souin as Tyk plugin
56+ -
57+ name : Build Souin as Tyk plugin
4858 run : make build-and-run-tyk
49- - name : Wait for Souin is really loaded inside Tyk as middleware
59+ -
60+ name : Wait for Souin is really loaded inside Tyk as middleware
5061 uses : jakejarvis/wait-action@master
5162 with :
5263 time : 30s
53- - name : Set logs result as environment variable
64+ -
65+ name : Set logs result as environment variable
5466 run : cd plugins/tyk && echo "TYK_DC_RESULT=$(docker-compose logs tyk-gateway | grep -i '\[INFO\] Olric bindAddr')" >> $GITHUB_ENV
55- - name : Check Olric is loaded to define if Souin is loaded too
67+ -
68+ name : Check Olric is loaded to define if Souin is loaded too
5669 uses : nick-invision/assert-action@v1
5770 with :
5871 expected : ' [INFO] Olric bindAddr'
5972 actual : ${{ env.TYK_DC_RESULT }}
6073 comparison : contains
61- - name : Run Tyk E2E tests
74+ -
75+ name : Run Tyk E2E tests
6276 uses : anthonyvscode/newman-action@v1
6377 with :
6478 collection : " docs/e2e/Souin E2E.postman_collection.json"
@@ -69,38 +83,48 @@ jobs:
6983 name : Check that Souin build as Træfik plugin
7084 runs-on : ubuntu-latest
7185 steps :
72- - name : Add domain.com host to /etc/hosts
86+ -
87+ name : Add domain.com host to /etc/hosts
7388 run : |
7489 sudo echo "127.0.0.1 domain.com" | sudo tee -a /etc/hosts
75- - name : Install Go
90+ -
91+ name : Install Go
7692 uses : actions/setup-go@v2
7793 with :
7894 go-version : 1.16
79- - name : Checkout code
95+ -
96+ name : Checkout code
8097 uses : actions/checkout@v2
81- - name : Build Souin as Træfik plugin
98+ -
99+ name : Build Souin as Træfik plugin
82100 run : make build-and-run-traefik
83- - name : Wait for Souin is really loaded inside Træfik as plugin
101+ -
102+ name : Wait for Souin is really loaded inside Træfik as plugin
84103 uses : jakejarvis/wait-action@master
85104 with :
86105 time : 30s
87- - name : Set traefik logs file result as environment variable
106+ -
107+ name : Set traefik logs file result as environment variable
88108 run : cd plugins/traefik && echo "TRAEFIK_FILE_RESULT=$(docker-compose logs traefik | grep 'Starting provider \*file.Provider')" >> $GITHUB_ENV
89- - name : Check logs to define if Souin configuration is loaded too
109+ -
110+ name : Check logs to define if Souin configuration is loaded too
90111 uses : nick-invision/assert-action@v1
91112 with :
92113 expected : ' /souin-configuration.yaml'
93114 actual : ${{ env.TRAEFIK_FILE_RESULT }}
94115 comparison : contains
95- - name : Set traefik logs configuration result as environment variable
116+ -
117+ name : Set traefik logs configuration result as environment variable
96118 run : cd plugins/traefik && echo "TRAEFIK_MIDDLEWARE_RESULT=$(docker-compose logs traefik | grep default_cache)" >> $GITHUB_ENV
97- - name : Check if the configuration is loaded to define if Souin is loaded too
119+ -
120+ name : Check if the configuration is loaded to define if Souin is loaded too
98121 uses : nick-invision/assert-action@v1
99122 with :
100123 expected : ' "middlewares\":{\"souin\":{\"plugin\":{\"souin-plugin'
101124 actual : ${{ env.TRAEFIK_MIDDLEWARE_RESULT }}
102125 comparison : contains
103- - name : Run Træfik E2E tests
126+ -
127+ name : Run Træfik E2E tests
104128 uses : anthonyvscode/newman-action@v1
105129 with :
106130 collection : " docs/e2e/Souin E2E.postman_collection.json"
0 commit comments