-
Notifications
You must be signed in to change notification settings - Fork 0
59 lines (57 loc) · 1.9 KB
/
python-pr.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
name: PR
on:
pull_request:
branches: [develop]
paths:
- "src/**"
- "tests/**"
- setup.cfg
- setup.py
- tox.ini
- "requirements/**"
- "docs/**"
jobs:
tests:
name: ${{ matrix.name }}
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- {
name: Linux,
python: "3.10",
os: ubuntu-latest,
tox: py310,
}
# - {
# name: Windows,
# python: "3.9",
# os: windows-latest,
# tox: py39,
# }
# - { name: Mac, python: "3.9", os: macos-latest, tox: py39 }
steps:
- uses: actions/checkout@v3
- uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python }}
- name: update-pip
run: |
pip install -U wheel
pip install -U setuptools
python -m pip install -U pip
- name: get-pip-cache-dir
id: pip-cache
run: echo "::set-output name=dir::$(pip cache dir)"
- name: cache-pip
uses: actions/[email protected]
with:
path: ${{ steps.pip-cache.outputs.dir }}
key: pip|${{ runner.os }}|${{ matrix.python }}|${{ hashFiles('setup.py') }}|${{ hashFiles('requirements/*.txt') }}
- name: install-utils
run: pip install tox
# - name: lint
# run: black --check -t py39 --diff --color src
- name: tests
run: tox -e ${{ matrix.tox }}