Skip to content

Commit

Permalink
ci: use a healthcheck route
Browse files Browse the repository at this point in the history
  • Loading branch information
tpluscode committed Sep 17, 2020
1 parent b0c2bd9 commit ba1227f
Show file tree
Hide file tree
Showing 5 changed files with 8 additions and 21 deletions.
17 changes: 6 additions & 11 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -13,24 +13,19 @@ jobs:
- run: yarn install --ci
- run: yarn lint

analyse:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
- name: Install lando
run: sh e2e-tests/install-lando.sh
- name: Start site
run: sh e2e-tests/start-lando.sh
- run: docker-compose -f docker-compose.yml -f docker-compose.posix.yml run analyser

e2e-tests:
runs-on: [ubuntu-latest]
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 13
- run: yarn install --ci
- name: Install lando
run: sh e2e-tests/install-lando.sh
- name: Start site
run: sh e2e-tests/start-lando.sh
- run: docker-compose -f docker-compose.yml -f docker-compose.posix.yml run e2e-tests
- name: logs on fail
if: ${{ failure() }}
run: lando logs -s core
1 change: 1 addition & 0 deletions apis/core/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,6 +19,7 @@ async function main() {
app.enable('trust proxy')

app.get('/env-config.js', uiConfig)
app.get('/ping', (req, res) => res.status(204).end())

app.use(await authentication())
await hydraBox(app, {
Expand Down
3 changes: 0 additions & 3 deletions docker-compose.posix.yml
Original file line number Diff line number Diff line change
@@ -1,8 +1,5 @@
version: "3"
services:
analyser:
volumes:
- ~/.lando/certs/lndo.site.crt:/lndo.site.crt
e2e-tests:
volumes:
- ~/.lando/certs/lndo.site.crt:/lndo.site.crt
6 changes: 0 additions & 6 deletions docker-compose.yml
Original file line number Diff line number Diff line change
@@ -1,11 +1,5 @@
version: "3"
services:
analyser:
image: "hydrofoil/hydra-analyser"
network_mode: "host"
environment:
NODE_EXTRA_CA_CERTS: "/lndo.site.crt"
ENTRYPOINT_URL: "https://cube-creator.lndo.site/"
e2e-tests:
image: hydrofoil/hypertest:0.6.4
network_mode: "host"
Expand Down
2 changes: 1 addition & 1 deletion e2e-tests/start-lando.sh
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
#!/usr/bin/env bash

lando start
npx wait-on --timeout 30000 http://cube-creator.lndo.site
npx wait-on --timeout 30000 https://cube-creator.lndo.site/ping

0 comments on commit ba1227f

Please sign in to comment.