forked from SoPR/horas
-
Notifications
You must be signed in to change notification settings - Fork 3
39 lines (31 loc) · 986 Bytes
/
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
name: CI
env:
DJANGO_SECRET_KEY: "SecretKeyForCI"
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python 3.7
uses: actions/setup-python@v2
with:
python-version: 3.7
- name: Install pipenv
run: |
python -m pip install --upgrade pipenv wheel
- name: Cache pipenv
id: cache-pipenv
uses: actions/cache@v2
with:
path: ~/.local/share/virtualenvs
key: ${{ runner.os }}-pipenv-${{ hashFiles('**/Pipfile.lock') }}
- name: Install Python dependencies
if: steps.cache-pipenv.outputs.cache-hit != 'true'
run: |
pipenv install --dev
- name: Lint with black
run: pipenv run black --check .
- name: Lint with flake8
run: pipenv run flake8 horas --ignore=E501
- name: Test
run: pipenv run python manage.py test --configuration=Testing --verbosity=3 --noinput