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] }}