-
Notifications
You must be signed in to change notification settings - Fork 1
40 lines (34 loc) · 979 Bytes
/
checks.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
name: CI/CD Checks
on: [push]
jobs:
test-lint:
name: Test and Lint
runs-on: ubuntu-20.04
steps:
- name: Checkout
uses: actions/checkout@v2
- name: Install dependencies
run: |
sudo apt-get update
sudo apt-get install python3 python3-venv python3-pip
python3 --version
cd docnet_backend
python3 -m venv venv
. venv/bin/activate
pip install --upgrade pip
pip install -r requirements.txt
- name: Set environment variables
run: echo "SECRET_KEY=${{ secrets.SECRET_KEY }}" >> $GITHUB_ENV
- name: Run Django tests
env:
SECRET_KEY: ${{ secrets.SECRET_KEY }}
run: |
cd docnet_backend
. venv/bin/activate
python manage.py migrate
python manage.py test
- name: Lint with flake8
run: |
cd docnet_backend
. venv/bin/activate
flake8 .