Merge pull request #44 from unt-libraries/django42 #12
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |