-
Notifications
You must be signed in to change notification settings - Fork 0
57 lines (50 loc) · 1.65 KB
/
endToEnd.js.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
name: End2end tests
on:
- pull_request
jobs:
build:
runs-on: ubuntu-latest
services:
mongo:
image: mongo:6.0
ports:
- 27017:27017
steps:
# Check out the repository
- id: checkout_api
continue-on-error: true
uses: actions/checkout@v3
with:
repository: 'sophiemoustard/compani-api'
ref: ${{ github.event.pull_request.head.ref }}
path: 'api'
- if: ${{ steps.checkout_api.outcome != 'success' }}
uses: actions/checkout@v3
with:
repository: 'sophiemoustard/compani-api'
ref: dev
path: 'api'
- uses: actions/setup-node@v3
with:
node-version: 20.18.0
- run: cd api && yarn install
env:
DETACHMENT_ALLOWED_COMPANY_IDS : ${{ secrets.DETACHMENT_ALLOWED_COMPANY_IDS }}
SINGLE_COURSES_SUBPROGRAM_IDS : ${{ secrets.SINGLE_COURSES_SUBPROGRAM_IDS }}
- uses: actions/checkout@v3
with:
path: 'webapp'
- run: cd webapp && npm ci
# Install NPM dependencies, cache them correctly
# and run all Cypress tests
- name: Cypress run
uses: cypress-io/github-action@v5
with:
working-directory: ./webapp
start: npm run start:workflow:api, npm run start:workflow:webapp
wait-on: 'http://localhost:8080'
env:
API_HOSTNAME: ${{ secrets.API_HOSTNAME }}
TOKEN_SECRET: ${{ secrets.TOKEN_SECRET }}
DETACHMENT_ALLOWED_COMPANY_IDS : ${{ secrets.DETACHMENT_ALLOWED_COMPANY_IDS }}
SINGLE_COURSES_SUBPROGRAM_IDS : ${{ secrets.SINGLE_COURSES_SUBPROGRAM_IDS }}