-
Notifications
You must be signed in to change notification settings - Fork 1
82 lines (82 loc) · 2.7 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
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
name: CI
on: [push, pull_request]
jobs:
org-check:
name: Check GitHub Organization
if: ${{ github.repository_owner == 'jsirois' }}
runs-on: ubuntu-22.04
steps:
- name: Noop
run: "true"
checks:
name: TOXENV=${{ matrix.tox-env }}
needs: org-check
runs-on: ubuntu-22.04
strategy:
matrix:
include:
- check-name: Lint
python-version: 3.9
tox-env: lint
- check-name: Types
python-version: 3.9
tox-env: typecheck
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: "${{ matrix.python-version }}"
- name: Check ${{ matrix.check-name }}
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: ${{ matrix.tox-env }}
unit-tests-legacy:
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [[2, 7, 18]]
os: [ubuntu-22.04, macos-12]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: gabrielfalcao/pyenv-action@v18
with:
default: "${{ join(matrix.python-version, '.') }}"
command: pip install -U tox
- name: Run Unit Tests
run: tox -epy${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs
unit-tests:
name: (${{ matrix.os }}) TOXENV=py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }}
needs: org-check
runs-on: ${{ matrix.os }}
strategy:
matrix:
python-version: [[3, 7], [3, 8], [3, 9], [3, 10], [3, 11], [3, 12], [3, 13, "0-alpha.2"]]
os: [ubuntu-22.04, macos-12]
exclude:
- os: macos-12
python-version: [3, 7]
- os: macos-12
python-version: [3, 8]
- os: macos-12
python-version: [3, 9]
- os: macos-12
python-version: [3, 10]
- os: macos-12
python-version: [3, 11]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Python ${{ join(matrix.python-version, '.') }}
uses: actions/setup-python@v5
with:
python-version: "${{ join(matrix.python-version, '.') }}"
- name: Run Unit Tests
uses: pantsbuild/actions/run-tox@b16b9cf47cd566acfe217b1dafc5b452e27e6fd7
with:
tox-env: py${{ matrix.python-version[0] }}${{ matrix.python-version[1] }} -- -vvs