File tree Expand file tree Collapse file tree 2 files changed +21
-29
lines changed Expand file tree Collapse file tree 2 files changed +21
-29
lines changed Original file line number Diff line number Diff line change 6
6
- feature/heroku
7
7
8
8
jobs :
9
+ test :
10
+ uses : ./.github/workflows/ci.yml
11
+
9
12
deploy :
10
- needs : test
13
+ needs : test
11
14
runs-on : ubuntu-latest
12
15
steps :
13
16
- uses : actions/checkout@v2
14
-
15
- - name : Install Heroku CLI
16
- run : |
17
- curl https://cli-assets.heroku.com/install.sh | sh
18
-
19
- - name : Login to Heroku Container Registry
20
- env :
21
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
22
- run : heroku container:login
23
-
24
- - name : Set Heroku stack to container
25
- env :
26
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
27
- run : heroku stack:set container -a github-commit-monitor
28
-
29
- - name : Build and push
30
- env :
31
- HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
32
- run : |
33
- heroku container:push web -a github-commit-monitor
34
- heroku container:release web -a github-commit-monitor
35
-
36
- - name : Set environment variables
17
+
18
+ - name : Deploy to Heroku
19
+ uses : akhileshns/heroku-deploy@v3.12.14
20
+ with :
21
+ heroku_api_key : ${{ secrets.HEROKU_API_KEY }}
22
+ heroku_app_name : " github-commit-monitor"
23
+ heroku_email : ${{ secrets.HEROKU_EMAIL }}
24
+
25
+ - name : Set Heroku config vars
37
26
env :
38
27
HEROKU_API_KEY : ${{ secrets.HEROKU_API_KEY }}
39
28
run : |
Original file line number Diff line number Diff line change @@ -20,17 +20,20 @@ jobs:
20
20
with :
21
21
python-version : ' 3.9'
22
22
23
- - name : Upgrade pip and setuptools
24
- run : |
25
- python -m pip install --upgrade pip setuptools
26
-
27
23
- name : Install dependencies
28
24
run : |
25
+ python -m pip install --upgrade pip
29
26
pip install -r requirements.txt
30
27
31
28
- name : Run tests
32
29
env :
33
30
MY_GITHUB_SECRET : ${{ secrets.MY_GITHUB_SECRET }}
34
31
CHANNEL_ID : ${{ secrets.CHANNEL_ID }}
35
32
run : |
36
- python -m pytest --cov=app tests/ --cov-report=html
33
+ python -m pytest --cov=app tests/ --cov-report=html
34
+
35
+ - name : Upload coverage reports
36
+ uses : actions/upload-artifact@v2
37
+ with :
38
+ name : coverage-report
39
+ path : htmlcov/
You can’t perform that action at this time.
0 commit comments