-
-
Notifications
You must be signed in to change notification settings - Fork 82
36 lines (34 loc) · 1.02 KB
/
lint-and-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
33
34
35
36
name: Lint and test
on:
workflow_dispatch:
pull_request:
jobs:
lint-and-test:
runs-on: ubuntu-latest
strategy:
max-parallel: 5
matrix:
python-version: ['3.x']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
sudo apt update
sudo apt -y install libxslt-dev libxml2-dev
python -m pip install --upgrade pip setuptools
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --max-line-length=120 --show-source --statistics
- name: Set secret key
run: ./sbin/patchman-set-secret-key
- name: Test with django
run: |
pip install legacy-cgi
./manage.py test