Skip to content

Commit

Permalink
Test on operating systems we can support (#804)
Browse files Browse the repository at this point in the history
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 <browne@vmware.com>
  • Loading branch information
ericwb authored Feb 18, 2022
1 parent 0f4a495 commit e2fa501
Showing 1 changed file with 17 additions and 70 deletions.
87 changes: 17 additions & 70 deletions .github/workflows/pythonpackage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ jobs:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v1
- name: Checkout repository
uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -29,7 +30,8 @@ jobs:
matrix:
python-version: [3.7]
steps:
- uses: actions/checkout@v1
- name: Checkout repository
uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
Expand All @@ -43,82 +45,27 @@ jobs:
- name: Run tox
run: tox -e pep8

py37:
runs-on: ubuntu-latest
tests:
strategy:
matrix:
python-version: [3.7]
python-version: [
["3.7", "37"], ["3.8", "38"], ["3.9", "39"], ["3.10", "310"]
]
os: [ubuntu-latest, macos-latest]
runs-on: ${{ matrix.os }}
name: ${{ matrix.os }} (${{ matrix.python-version[0] }})
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
- name: Checkout repository
uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version[0] }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install tox
- name: Run tox
run: tox -e py37

py38:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.8]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install tox
- name: Run tox
run: tox -e py38

py39:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: [3.9]
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install tox
- name: Run tox
run: tox -e py39

py310:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.10']
steps:
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v1
with:
python-version: ${{ matrix.python-version }}
python-version: ${{ matrix.python-version[0] }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r requirements.txt
pip install -r test-requirements.txt
pip install tox
- name: Run tox
run: tox -e py310
run: tox -e py${{ matrix.python-version[1] }}

0 comments on commit e2fa501

Please sign in to comment.