-
-
Notifications
You must be signed in to change notification settings - Fork 259
93 lines (88 loc) · 3.25 KB
/
main.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
85
86
87
88
89
90
91
92
93
name: Tests
on:
push:
branches: [master]
jobs:
deploy-test-1:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- run: npm run setup tests/test-1/data.json
- run: |
git config --global user.email "nsakhilesh02@gmail.com"
git config --global user.name "AkhileshNS"
git add -A
git commit -m "Added data.json"
- uses: akhileshns/heroku-deploy@master
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "akhileshns-hd-test-1"
heroku_email: "nsakhilesh02@gmail.com"
appdir: "tests/test-1"
healthcheck: "https://akhileshns-hd-test-1.herokuapp.com/"
env_file: ".env"
env:
HD_CHECK: "true"
- run: npm run test-action https://akhileshns-hd-test-1.herokuapp.com/
deploy-test-2:
runs-on: ubuntu-latest
needs: deploy-test-1
steps:
- uses: actions/checkout@v2
- run: npm run setup tests/test-2/public_html/index.html
- run: |
git config --global user.email "nsakhilesh02@gmail.com"
git config --global user.name "AkhileshNS"
git add -A
git commit -m "Added index.html"
- uses: akhileshns/heroku-deploy@master
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "akhileshns-hd-test-2"
heroku_email: "nsakhilesh02@gmail.com"
appdir: "tests/test-2"
buildpack: "https://github.com/heroku/heroku-buildpack-static.git"
healthcheck: "https://akhileshns-hd-test-2.herokuapp.com/"
delay: 5
- run: npm run test-action https://akhileshns-hd-test-2.herokuapp.com/
deploy-test-3:
runs-on: ubuntu-latest
needs: deploy-test-2
steps:
- uses: actions/checkout@v2
- run: npm run setup tests/test-3/data.json
- run: |
git config --global user.email "nsakhilesh02@gmail.com"
git config --global user.name "AkhileshNS"
git add -A
git commit -m "Added data.json"
- uses: akhileshns/heroku-deploy@master
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "akhileshns-hd-test-3"
heroku_email: "nsakhilesh02@gmail.com"
appdir: "tests/test-3"
usedocker: true
healthcheck: "https://akhileshns-hd-test-3.herokuapp.com/"
- run: npm run test-action https://akhileshns-hd-test-3.herokuapp.com/
deploy-test-4:
runs-on: ubuntu-latest
needs: deploy-test-3
steps:
- uses: actions/checkout@v2
- run: npm run setup tests/test-4/data.json
- run: |
git config --global user.email "nsakhilesh02@gmail.com"
git config --global user.name "AkhileshNS"
git add -A
git commit -m "Added data.json"
- uses: akhileshns/heroku-deploy@master
with:
heroku_api_key: ${{secrets.HEROKU_API_KEY}}
heroku_app_name: "akhileshns-hd-test-4"
heroku_email: "nsakhilesh02@gmail.com"
appdir: "tests/test-4"
healthcheck: "https://akhileshns-hd-test-4.herokuapp.com/health"
checkstring: "ok"
procfile: "web: gunicorn index:app"
- run: npm run test-action https://akhileshns-hd-test-4.herokuapp.com/