-
Notifications
You must be signed in to change notification settings - Fork 20
34 lines (34 loc) · 1.1 KB
/
qa-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
name: Lint code and run unit tests
on:
workflow_dispatch:
jobs:
qa-checks:
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: ['ubuntu-latest']
python: ['3.8', '3.9', '3.10', '3.11', '3.12']
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python }}
- name: Install core dependencies
run: |
pip install -r requirements.txt
- name: Lint with flake8
run: |
pip install flake8
# Stop the build if there are Python syntax errors or undefined names.
flake8 . --select=E9,F63,F7,F82 --show-source
# Exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide.
flake8 . --exit-zero --max-complexity=10 --max-line-length=127
- name: Run Python unit tests
run: |
python -m unittest discover -v tests/
env:
AUTOMX2_CONF: 'tests/unittest.conf'
# Skip LDAP-based tests for GitHub CI
RUN_LDAP_TESTS: 0