-
Notifications
You must be signed in to change notification settings - Fork 0
71 lines (55 loc) · 1.99 KB
/
check-python.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
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
on: [push, pull_request]
name: "Python checks"
permissions:
contents: read
jobs:
check:
if: "! contains(github.event.head_commit.message, '[ci skip]')"
timeout-minutes: 10
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.python }})
strategy:
fail-fast: false
matrix:
config:
# - {os: windows-latest, python: '3.12' }
- {os: windows-latest, python: '3.11' }
# - {os: macOS-latest, python: '3.12' }
- {os: macOS-latest, python: '3.11' }
- {os: ubuntu-latest, python: '3.12' }
- {os: ubuntu-latest, python: '3.11' }
- {os: ubuntu-latest, python: '3.10' }
- {os: ubuntu-latest, python: '3.9' }
- {os: ubuntu-latest, python: '3.8' }
- {os: ubuntu-20.04, python: '3.6' }
# - {os: ubuntu-20.04, python: '3.5' }
# - {os: ubuntu-18.04, python: '3.4' }
# - {os: ubuntu-18.04, python: '3.3' }
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "${{ matrix.config.python }}"
- name: Install Python dependencies
run: |
python -m pip install --upgrade pip
pip install pytest
- name: Install this Python package
run: |
pip install .[pydivsufsort]
- name: Session information
run: |
python --version
- name: Lint with flake8
if: matrix.config.os == 'ubuntu-latest' && matrix.config.python == '3.10'
run: |
pip install flake8
flake8 --version
# stop the build if there are Python syntax errors or undefined names
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
# exit-zero treats all errors as warnings. The GitHub editor is 127 chars wide
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
run: |
pytest