forked from yandex/gixy
-
Notifications
You must be signed in to change notification settings - Fork 4
68 lines (64 loc) · 2.25 KB
/
Copy pathpythonpackage.yml
File metadata and controls
68 lines (64 loc) · 2.25 KB
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
name: Python tests
on: [push, pull_request]
permissions:
contents: read
jobs:
legacy:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
matrix:
python-version: ['3.6', '3.7']
container:
image: python:${{ matrix.python-version }}
steps:
- name: Install git (needed for actions/checkout in a container)
run: |
apt-get update
apt-get install -y git
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Install dependencies & test
env:
PYTHONWARNINGS: always
run: |
python -m pip install -U pip
python -m pip install -r requirements.txt -r requirements.dev.txt
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
pytest tests -vv -W always -rA -n auto
modern:
name: Test on Python ${{ matrix.python-version }}
runs-on: ubuntu-22.04
strategy:
fail-fast: false
max-parallel: 4
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11', '3.12', '3.13', '3.14']
include:
- python-version: '3.15-dev'
experimental: true
continue-on-error: ${{ matrix.experimental || false }}
steps:
- uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
requirements.txt
requirements.dev.txt
- name: Install dependencies
run: |
python -m pip install -U pip
python -m pip install -r requirements.txt -r requirements.dev.txt
- name: Lint with flake8
run: |
flake8 . --count --select=E9,F63,F7,F82 --show-source --statistics
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=127 --statistics
- name: Test with pytest
env:
PYTHONWARNINGS: always
GITHUB_API_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
pytest tests -vv -W always -rA -n auto