-
Notifications
You must be signed in to change notification settings - Fork 33
53 lines (51 loc) · 1.69 KB
/
ci.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
name: python_hosts
on: [push]
jobs:
py27:
runs-on: ubuntu-latest
container: coatldev/six:latest
steps:
- name: Checkout repo
uses: actions/checkout@v3
# Ref: https://github.com/actions/runner/issues/652
- name: Install dependencies (with no caching)
run: |
pip install "cython<3.0.0" wheel
pip install "pyyaml==5.4.1" --no-build-isolation
python -m pip install --no-cache-dir --upgrade pip tox
- name: Test with tox
run: tox -e py27
py3:
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ ubuntu-latest, macos-latest, windows-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11", "pypy3.9" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "cython<3.0.0" wheel
pip install "pyyaml==5.4.1" --no-build-isolation
pip install tox tox-gh-actions
- name: Install python 3 test requirements
run: |
pip install -r test-requirements.txt
- name: Install ruff
run: |
pip install ruff
- name: Lint with ruff
run: |
# stop the build if there are Python syntax errors or undefined names
ruff --select=E9,F63,F7,F82 --target-version=py37 .
# default set of ruff rules with GitHub Annotations
ruff --target-version=py37 .
- name: Test with tox
run: tox
env:
PLATFORM: ${{ matrix.platform }}