-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (54 loc) · 2.59 KB
/
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
name: End to End Tests
on:
push:
branches:
- master
pull_request:
jobs:
e2e:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Use Node.js 18.x
uses: actions/setup-node@v1
with:
node-version: 18.x
- name: Install npm packages using cache
uses: bahmutov/npm-install@v1
with:
# the IBI Group TSDX fork has some dependency issues
# that cause yarn install to fail on a ci runner. Disabling
# concurrency allows installation to complete successfully
install-command: yarn --frozen-lockfile --network-concurrency 1
- name: Download middleware
run: "git clone https://github.com/ibi-group/otp-middleware.git"
- name: Load e2e middleware config
run: echo $E2E_OTP_MIDDLEWARE_DOCKER_CONFIG_BASE64 | base64 -d > otp-middleware/configurations/default/env.docker.yml
env:
E2E_OTP_MIDDLEWARE_DOCKER_CONFIG_BASE64: ${{ secrets.E2E_OTP_MIDDLEWARE_DOCKER_CONFIG_BASE64 }}
- name: Load e2e middleware admin user mongo seed
run: echo $E2E_USER_MONGO_JSON_DUMP_BASE64 | base64 -d > otp-middleware/configurations/e2e-mongo-seed/admin-e2euser.json
env:
E2E_USER_MONGO_JSON_DUMP_BASE64: ${{ secrets.E2E_USER_MONGO_JSON_DUMP_BASE64 }}
- name: Load e2e middleware api user mongo seed
run: echo $E2E_API_USER_MONGO_JSON_DUMP_BASE64 | base64 -d > otp-middleware/configurations/e2e-mongo-seed/api-e2euser.json
env:
E2E_API_USER_MONGO_JSON_DUMP_BASE64: ${{ secrets.E2E_API_USER_MONGO_JSON_DUMP_BASE64 }}
- name: Load e2e aws credentials
run: echo $E2E_AWS_CREDS_BASE64 | base64 -d > otp-middleware/configurations/default/aws-credentials
env:
E2E_AWS_CREDS_BASE64: ${{ secrets.E2E_AWS_CREDS_BASE64 }}
- name: Start middleware
run: docker compose -f "otp-middleware/docker-compose.yml" -f "otp-middleware/docker-compose.e2e.yml" up -d
- name: Wait for middleware to start
run: sleep 10 && docker ps -a && docker logs -t otp-middleware-otp-middleware-1
- name: Run e2e tests
run: yarn e2e-test
env:
E2E_USERNAME: ${{ secrets.E2E_USERNAME }}
E2E_USERNAME_API: ${{ secrets.E2E_USERNAME_API }}
E2E_NEW_USERNAME_1: ${{ secrets.E2E_NEW_USERNAME_1 }}
E2E_PASSWORD: ${{ secrets.E2E_PASSWORD }}
- name: Stop containers
if: always()
run: docker logs -t otp-middleware-otp-middleware-1 && docker compose -f "otp-middleware/docker-compose.yml" -f "otp-middleware/docker-compose.e2e.yml" down