-
Notifications
You must be signed in to change notification settings - Fork 246
36 lines (32 loc) · 1 KB
/
pythonapp.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
name: job-portal
on: [push]
jobs:
build:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- run: |
git fetch --prune --unshallow
- name: Set up Python 3.11
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
- name: Run black code formatter
run: |
black --check --exclude='./*/migrations/' ./
- name: Run tests
run: |
python manage.py collectstatic
python manage.py test # Don't forget to run tests
# - name: Deploy to Heroku
# env:
# HEROKU_API_TOKEN: ${{ secrets.HEROKU_API_TOKEN }}
# HEROKU_APP_NAME: ${{ secrets.HEROKU_APP_NAME }}
# if: github.ref == 'refs/heads/master' && job.status == 'success'
# run: |
# git remote add heroku https://heroku:[email protected]/$HEROKU_APP_NAME.git
# git push heroku HEAD:master -f