-
Notifications
You must be signed in to change notification settings - Fork 0
58 lines (48 loc) · 1.38 KB
/
ci.yaml
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
name: Unit tests
on:
push:
branches:
- "master"
pull_request:
branches:
- "*"
jobs:
ci-run:
name: Run CI
if: "!contains(github.event.head_commit.message, 'skip ci')"
runs-on: "ubuntu-latest"
env:
CI: 1
SECRET_KEY: ${{ secrets.SECRET_KEY }}
DB_NAME: ${{ secrets.DB_NAME }}
DB_USER: ${{ secrets.DB_USER }}
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
DEBUG: ${{ secrets.DEBUG }}
steps:
- name: Checkout the code
uses: actions/checkout@v3
- name: Set up Python 3.9
uses: actions/setup-python@v3
with:
python-version: 3.9
cache: pip
- name: Lint
run: |
pip install black>=20.8b1
black --check .
- name: Install dependencies
run: pip install -r requirements.txt
- name: Run tests
run: |
bash scripts/start-docker-postgres.sh
sleep 5 # wait for postgres to start
bash scripts/run-tests.sh
#- name: Deploy stream server to heroku
# if: github.ref == 'refs/heads/master'
# uses: nyakaz73/[email protected]
# with:
# heroku_app_name: ${{ secrets.HEROKU_APP_NAME }}
# heroku_api_key: ${{ secrets.HEROKU_API_KEY }}
# heroku_email_address: ${{ secrets.HEROKU_EMAIL }}
# use_git: true
# git_branch: master