-
-
Notifications
You must be signed in to change notification settings - Fork 22
84 lines (82 loc) · 2.52 KB
/
test-e2e.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
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
name: E2E Tests
on:
workflow_dispatch:
pull_request:
push:
branches:
- main
- master
jobs:
test-tunnel:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.19"
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: |
go build -o ory .
./ory tunnel http://localhost:4001 --project admiring-tu-swczqlujc0 --quiet &
env:
ORY_API_KEY: ${{ secrets.ORY_PROJECT_API_KEY }}
- name: Install dependencies and run server
working-directory: cmd/cloudx/e2e
run: |
npm ci
- name: Run tests
working-directory: cmd/cloudx/e2e
run: |
npm run server &
docker run \
-e HYDRA_ADMIN_URL=https://admiring-tu-swczqlujc0.projects.oryapis.com \
-e ORY_API_KEY="${{ secrets.ORY_PROJECT_API_KEY }}" \
-p 4445:3000 -d \
--name hydra-ui \
docker.io/oryd/hydra-login-consent-node:v2.0.0-alpha.0.pre.2
npm run test
env:
CYPRESS_RECORD_KEY: e8bf86fe-6605-4112-af1d-c3a2f052d4f8
CYPRESS_IS_TUNNEL: 1
- if: ${{ failure() }}
run: |
docker ps -a
docker logs hydra-ui
curl -v http://localhost:4445
test-proxy:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-go@v2
with:
go-version: "^1.19"
- uses: actions/setup-node@v2
with:
node-version: "16"
- run: |
go build -o ory .
./ory proxy https://ory-network-httpbin-ijakee5waq-ez.a.run.app/anything --rewrite-host --project admiring-tu-swczqlujc0 --quiet &
env:
ORY_API_KEY: ${{ secrets.ORY_PROJECT_API_KEY }}
- name: Install Node
working-directory: cmd/cloudx/e2e
run: |
npm ci
- working-directory: cmd/cloudx/e2e
run: |
docker run \
-e HYDRA_ADMIN_URL=https://admiring-tu-swczqlujc0.projects.oryapis.com \
-e ORY_API_KEY="${{ secrets.ORY_PROJECT_API_KEY }}" \
-p 4445:3000 -d \
--name hydra-ui \
docker.io/oryd/hydra-login-consent-node:v2.0.0-alpha.0.pre.2
npm run test
env:
CYPRESS_RECORD_KEY: e8bf86fe-6605-4112-af1d-c3a2f052d4f8
- if: ${{ failure() }}
run: |
docker ps -a
docker logs hydra-ui
curl -v http://localhost:4445