-
Notifications
You must be signed in to change notification settings - Fork 75
54 lines (50 loc) · 1.68 KB
/
cypress-integration.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
name: 'Cypress Integration Tests'
on: [push]
jobs:
cypressIntegration:
services:
mongo:
image: mongo
ports:
- 27017:27017
runs-on: ubuntu-latest
steps:
# Checkout each repo into sub-directories
- uses: actions/checkout@v2
with:
repository: conveyal/analysis-ui
ref: 1701bd9aea859a4714bc3f35f5bcf767a3256a64
path: ui
- uses: actions/checkout@v2
with:
fetch-depth: 0
path: r5
# Build .jar and copy to ./ui directory (along with config file)
# Cache Gradle dependencies to speed up the shadow jar build
- uses: actions/cache@v1
id: cache
with:
path: ~/.gradle/caches
key: gradle-caches
- uses: actions/setup-java@v1
with:
java-version: 11
- run: gradle shadowJar -x test
working-directory: r5
- run: cp $(ls ./r5/build/libs/*-all.jar | head -n1) ./ui/latest.jar
- run: cp ./r5/analysis.properties.template ./ui/analysis.properties
# Install / cache dependencies with Cypress to handle caching Cypress binary.
- uses: actions/setup-node@v2
with:
node-version: '12'
- uses: cypress-io/github-action@v2
env:
NEXT_PUBLIC_BASEMAP_DISABLED: true
NEXT_PUBLIC_CYPRESS: true
NEXT_PUBLIC_MAPBOX_ACCESS_TOKEN: ${{ secrets.MAPBOX_ACCESS_TOKEN }}
with:
build: yarn build
start: yarn start, yarn start-backend # runs frontend and java server together
wait-on: 'http://localhost:3000, http://localhost:7070/version'
wait-on-timeout: 60
working-directory: ui