Skip to content

Commit c15dbd8

Browse files
committed
Update CI config.
1 parent 621ce77 commit c15dbd8

File tree

5 files changed

+70
-20
lines changed

5 files changed

+70
-20
lines changed

.github/workflows/mypy.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,36 @@
1+
# This file is managed by 'repo_helper'. Don't edit it directly.
2+
---
3+
name: mypy
4+
5+
on:
6+
push:
7+
pull_request:
8+
branches: ["master"]
9+
10+
jobs:
11+
Run:
12+
name: "mypy"
13+
runs-on: ${{ matrix.os }}
14+
15+
strategy:
16+
matrix:
17+
os: [ubuntu-latest, windows-latest, macos-latest]
18+
19+
steps:
20+
- name: Checkout 🛎️
21+
uses: "actions/checkout@v2"
22+
23+
- name: Setup Python 🐍
24+
uses: "actions/setup-python@v2"
25+
with:
26+
python-version: "3.8"
27+
28+
- name: Install dependencies 🔧
29+
run: |
30+
python -VV
31+
python -m site
32+
python -m pip install --upgrade pip setuptools wheel
33+
python -m pip install tox
34+
35+
- name: "Run mypy"
36+
run: "python -m tox -e mypy"

.github/workflows/python_ci.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,19 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
12+
name: "Python ${{ matrix.config.python-version }}"
1313
runs-on: "windows-2019"
1414
env:
1515
USING_COVERAGE: '3.6,3.7,3.8,3.9'
1616

1717
strategy:
1818
fail-fast: False
1919
matrix:
20-
python-version: ["3.6","3.7","3.8","3.9"]
20+
config:
21+
- {python-version: "3.6", testenvs: "py36,build"}
22+
- {python-version: "3.7", testenvs: "py37,build"}
23+
- {python-version: "3.8", testenvs: "py38,build"}
24+
- {python-version: "3.9", testenvs: "py39,build"}
2125

2226
steps:
2327
- name: Checkout 🛎️
@@ -26,14 +30,14 @@ jobs:
2630
- name: Setup Python 🐍
2731
uses: "actions/setup-python@v2"
2832
with:
29-
python-version: "${{ matrix.python-version }}"
33+
python-version: "${{ matrix.config.python-version }}"
3034

3135
- name: Install dependencies 🔧
3236
run: |
3337
python -VV
3438
python -m site
3539
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade tox tox-gh-actions virtualenv
40+
python -m pip install --upgrade tox virtualenv
3741
38-
- name: "Run Tests for Python ${{ matrix.python-version }}"
39-
run: "python -m tox"
42+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
43+
run: "python -m tox -e ${{ matrix.config.testenvs }}"

.github/workflows/python_ci_linux.yml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
12+
name: "Python ${{ matrix.config.python-version }}"
1313
runs-on: "ubuntu-18.04"
1414
env:
1515
USING_COVERAGE: '3.6,3.7,3.8,pypy3,3.9'
1616

1717
strategy:
1818
fail-fast: False
1919
matrix:
20-
python-version: ["3.6","3.7","3.8","pypy3","3.9"]
20+
config:
21+
- {python-version: "3.6", testenvs: "py36,build"}
22+
- {python-version: "3.7", testenvs: "py37,build"}
23+
- {python-version: "3.8", testenvs: "py38,build"}
24+
- {python-version: "pypy3", testenvs: "pypy3,build"}
25+
- {python-version: "3.9", testenvs: "py39,build"}
2126

2227
steps:
2328
- name: Checkout 🛎️
@@ -26,24 +31,24 @@ jobs:
2631
- name: Setup Python 🐍
2732
uses: "actions/setup-python@v2"
2833
with:
29-
python-version: "${{ matrix.python-version }}"
34+
python-version: "${{ matrix.config.python-version }}"
3035

3136
- name: Install dependencies 🔧
3237
run: |
3338
python -VV
3439
python -m site
3540
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade tox tox-gh-actions virtualenv
41+
python -m pip install --upgrade tox virtualenv
3742
python -m pip install --upgrade coverage_pyver_pragma
3843
39-
- name: "Run Tests for Python ${{ matrix.python-version }}"
40-
run: "python -m tox"
44+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
45+
run: "python -m tox -e ${{ matrix.config.testenvs }}"
4146

4247

4348
- name: "Upload Coverage"
4449
uses: actions/upload-artifact@v2
4550
with:
46-
name: "coverage-${{ matrix.python-version }}"
51+
name: "coverage-${{ matrix.config.python-version }}"
4752
path: .coverage
4853

4954

.github/workflows/python_ci_macos.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,20 @@ on:
99

1010
jobs:
1111
tests:
12-
name: "Python ${{ matrix.python-version }}"
12+
name: "Python ${{ matrix.config.python-version }}"
1313
runs-on: "macos-latest"
1414
env:
1515
USING_COVERAGE: '3.6,3.7,3.8,pypy3,3.9'
1616

1717
strategy:
1818
fail-fast: False
1919
matrix:
20-
python-version: ["3.6","3.7","3.8","pypy3","3.9"]
20+
config:
21+
- {python-version: "3.6", testenvs: "py36,build"}
22+
- {python-version: "3.7", testenvs: "py37,build"}
23+
- {python-version: "3.8", testenvs: "py38,build"}
24+
- {python-version: "pypy3", testenvs: "pypy3,build"}
25+
- {python-version: "3.9", testenvs: "py39,build"}
2126

2227
steps:
2328
- name: Checkout 🛎️
@@ -26,14 +31,14 @@ jobs:
2631
- name: Setup Python 🐍
2732
uses: "actions/setup-python@v2"
2833
with:
29-
python-version: "${{ matrix.python-version }}"
34+
python-version: "${{ matrix.config.python-version }}"
3035

3136
- name: Install dependencies 🔧
3237
run: |
3338
python -VV
3439
python -m site
3540
python -m pip install --upgrade pip setuptools wheel
36-
python -m pip install --upgrade tox tox-gh-actions virtualenv
41+
python -m pip install --upgrade tox virtualenv
3742
38-
- name: "Run Tests for Python ${{ matrix.python-version }}"
39-
run: "python -m tox"
43+
- name: "Run Tests for Python ${{ matrix.config.python-version }}"
44+
run: "python -m tox -e ${{ matrix.config.testenvs }}"

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ cov = py36, coverage
2727

2828
[gh-actions]
2929
python =
30-
3.6: py36, build, mypy
30+
3.6: py36, build
3131
3.7: py37, build
3232
3.8: py38, build
3333
pypy3: pypy3, build

0 commit comments

Comments
 (0)