-
Notifications
You must be signed in to change notification settings - Fork 33
62 lines (50 loc) · 1.9 KB
/
python-tests.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
# This workflow will install Python dependencies, run tests and lint with a
# variety of Python version
# https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Build Python extension and run tests
on:
push:
pull_request:
jobs:
build_and_run_tests:
runs-on: ${{ matrix.os }}
timeout-minutes: 15
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12']
os: [macos-latest, ubuntu-latest, windows-latest]
exclude:
- os: windows-latest
python-version: '3.7'
- os: macos-latest
python-version: '3.7'
- os: macos-latest
python-version: '3.8'
- os: macos-latest
python-version: '3.9'
include:
- os: macos-13
python-version: '3.7'
- os: macos-13
python-version: '3.8'
- os: macos-13
python-version: '3.9'
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Build and install at with tests
run: python -m pip install -e ".[dev]"
- name: Lint with flake8
working-directory: pyat
run: |
# 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. Options compatible with the 'black' code formatter
flake8 . --count --exit-zero --max-complexity=10 --max-line-length=88 --extend-ignore=E203,E704 --extend-select=W504 --per-file-ignores='*/__init__.py:F401,F403' --statistics
- name: Test with pytest and coverage
working-directory: pyat
run: python -m pytest test --cov-report term-missing --cov=at