Skip to content

Commit e2fa501

Browse files
authored
Test on operating systems we can support (#804)
This adds GitHub Action testing on the various operating systems we can potentially support. At the moment that includes Linux, and macOS. Each OS is put into its own job that way the output is clearer. Closes #405 Signed-off-by: Eric Brown <[email protected]>
1 parent 0f4a495 commit e2fa501

File tree

1 file changed

+17
-70
lines changed

1 file changed

+17
-70
lines changed

.github/workflows/pythonpackage.yml

Lines changed: 17 additions & 70 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@ jobs:
99
matrix:
1010
python-version: [3.7]
1111
steps:
12-
- uses: actions/checkout@v1
12+
- name: Checkout repository
13+
uses: actions/checkout@v1
1314
- name: Set up Python ${{ matrix.python-version }}
1415
uses: actions/setup-python@v1
1516
with:
@@ -29,7 +30,8 @@ jobs:
2930
matrix:
3031
python-version: [3.7]
3132
steps:
32-
- uses: actions/checkout@v1
33+
- name: Checkout repository
34+
uses: actions/checkout@v1
3335
- name: Set up Python ${{ matrix.python-version }}
3436
uses: actions/setup-python@v1
3537
with:
@@ -43,82 +45,27 @@ jobs:
4345
- name: Run tox
4446
run: tox -e pep8
4547

46-
py37:
47-
runs-on: ubuntu-latest
48+
tests:
4849
strategy:
4950
matrix:
50-
python-version: [3.7]
51+
python-version: [
52+
["3.7", "37"], ["3.8", "38"], ["3.9", "39"], ["3.10", "310"]
53+
]
54+
os: [ubuntu-latest, macos-latest]
55+
runs-on: ${{ matrix.os }}
56+
name: ${{ matrix.os }} (${{ matrix.python-version[0] }})
5157
steps:
52-
- uses: actions/checkout@v1
53-
- name: Set up Python ${{ matrix.python-version }}
54-
uses: actions/setup-python@v1
58+
- name: Checkout repository
59+
uses: actions/checkout@v2
60+
- name: Set up Python ${{ matrix.python-version[0] }}
61+
uses: actions/setup-python@v2
5562
with:
56-
python-version: ${{ matrix.python-version }}
57-
- name: Install dependencies
58-
run: |
59-
python -m pip install --upgrade pip
60-
pip install -r requirements.txt
61-
pip install -r test-requirements.txt
62-
pip install tox
63-
- name: Run tox
64-
run: tox -e py37
65-
66-
py38:
67-
runs-on: ubuntu-latest
68-
strategy:
69-
matrix:
70-
python-version: [3.8]
71-
steps:
72-
- uses: actions/checkout@v1
73-
- name: Set up Python ${{ matrix.python-version }}
74-
uses: actions/setup-python@v1
75-
with:
76-
python-version: ${{ matrix.python-version }}
77-
- name: Install dependencies
78-
run: |
79-
python -m pip install --upgrade pip
80-
pip install -r requirements.txt
81-
pip install -r test-requirements.txt
82-
pip install tox
83-
- name: Run tox
84-
run: tox -e py38
85-
86-
py39:
87-
runs-on: ubuntu-latest
88-
strategy:
89-
matrix:
90-
python-version: [3.9]
91-
steps:
92-
- uses: actions/checkout@v1
93-
- name: Set up Python ${{ matrix.python-version }}
94-
uses: actions/setup-python@v1
95-
with:
96-
python-version: ${{ matrix.python-version }}
97-
- name: Install dependencies
98-
run: |
99-
python -m pip install --upgrade pip
100-
pip install -r requirements.txt
101-
pip install -r test-requirements.txt
102-
pip install tox
103-
- name: Run tox
104-
run: tox -e py39
105-
106-
py310:
107-
runs-on: ubuntu-latest
108-
strategy:
109-
matrix:
110-
python-version: ['3.10']
111-
steps:
112-
- uses: actions/checkout@v1
113-
- name: Set up Python ${{ matrix.python-version }}
114-
uses: actions/setup-python@v1
115-
with:
116-
python-version: ${{ matrix.python-version }}
63+
python-version: ${{ matrix.python-version[0] }}
11764
- name: Install dependencies
11865
run: |
11966
python -m pip install --upgrade pip
12067
pip install -r requirements.txt
12168
pip install -r test-requirements.txt
12269
pip install tox
12370
- name: Run tox
124-
run: tox -e py310
71+
run: tox -e py${{ matrix.python-version[1] }}

0 commit comments

Comments
 (0)