generated from Arquisoft/radarin_0
-
Notifications
You must be signed in to change notification settings - Fork 2
75 lines (73 loc) · 2.02 KB
/
radarin.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
name: CI for radarin
on:
push:
branches: [master]
jobs:
build-test-webapp:
runs-on: ubuntu-latest
defaults:
run:
working-directory: webapp
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.14.1
- run: npm ci
- run: npm run build
- run: npm test
- uses: codecov/codecov-action@v1
build-test-restapi:
runs-on: ubuntu-latest
defaults:
run:
working-directory: restapi
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.14.1
- run: npm ci
- run: npm test
e2e-tests:
needs: [build-test-webapp, build-test-restapi]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/setup-node@v1
with:
node-version: 12.14.1
- run: npm --prefix webapp install
- run: npm --prefix restapi install
deploy-webapp:
needs: [e2e-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "radarines1awebapp" #Must be unique in Heroku
heroku_email: "[email protected]"
usedocker: true
appdir: "webapp"
docker_build_args: |
API_URI
env:
API_URI: "https://radarines1arestapi.herokuapp.com/api"
deploy-restapi:
needs: [e2e-tests]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: akhileshns/[email protected] # This is the action
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "radarines1arestapi" #Must be unique in Heroku
heroku_email: "[email protected]"
usedocker: true
appdir: "restapi"
docker_build_args: |
MONGO_URI
env:
MONGO_URI: ${{secrets.MONGO_URI}}