-
Notifications
You must be signed in to change notification settings - Fork 2
32 lines (28 loc) · 1012 Bytes
/
test.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
name: Test django-controlled-vocabularies
on: [push, pull_request, workflow_dispatch]
jobs:
build:
runs-on: ubuntu-20.04
strategy:
matrix:
python: ['3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v3
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install flake8
pip install -r requirements.txt
- name: Lint with flake8
run: |
# Python syntax errors or undefined names will stop the build completely.
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero will still allow the tests to pass, with these types of errors as warnings.
flake8 controlled_vocabularies tests setup.py --count --exit-zero --max-line-length=99 --statistics
- name: Run the tests
run: |
pytest