From 00661edecba4e9fb982e820932dd6bc5950f4bd9 Mon Sep 17 00:00:00 2001 From: Eric Brown Date: Mon, 7 Feb 2022 19:49:21 -0800 Subject: [PATCH] Test on operating systems we can support 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 --- .github/workflows/pythonpackage.yml | 87 ++++++----------------------- 1 file changed, 17 insertions(+), 70 deletions(-) diff --git a/.github/workflows/pythonpackage.yml b/.github/workflows/pythonpackage.yml index 9c5f11d80..80d788442 100644 --- a/.github/workflows/pythonpackage.yml +++ b/.github/workflows/pythonpackage.yml @@ -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: @@ -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: @@ -43,77 +45,22 @@ 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 @@ -121,4 +68,4 @@ jobs: pip install -r test-requirements.txt pip install tox - name: Run tox - run: tox -e py310 + run: tox -e py${{ matrix.python-version[1] }}