diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 2b9e31359..da217f133 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -11,22 +11,27 @@ on: jobs: pytest: - # Containers must run in Linux based operating systems - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest, macos-latest, windows-latest ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] + continue-on-error: true steps: - uses: actions/checkout@v3 - - name: Set up Python 3.8 + - name: Set up Python ${{ matrix.python-version }} + id: setup_python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} - name: Cache environment uses: actions/cache@master id: cache with: - path: ${{ env.pythonLocation }}/lib/python3.8/site-packages/* - key: ${{ runner.os }}-packages_only-${{ hashFiles('pyproject.toml') }} + path: ${{ env.pythonLocation }} + key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} - name: Install dependencies if: steps.cache.outputs.cache-hit != 'true' run: | @@ -36,22 +41,27 @@ jobs: run: python -m pytest -vv mypy: - # Containers must run in Linux based operating systems - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} + strategy: + matrix: + os: [ ubuntu-latest ] + python-version: [ "3.8", "3.9", "3.10", "3.11" ] + continue-on-error: true steps: - uses: actions/checkout@v3 - - name: Set up Python 3.8 + - name: Set up Python ${{ matrix.python-version }} + id: setup_python uses: actions/setup-python@v4 with: - python-version: 3.8 + python-version: ${{ matrix.python-version }} - name: Cache environment uses: actions/cache@master id: cache with: - path: ${{ env.pythonLocation }}/lib/python3.8/site-packages/* - key: ${{ runner.os }}-packages_only-${{ hashFiles('pyproject.toml') }} + path: ${{ env.pythonLocation }} + key: ${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('pyproject.toml') }} - name: Install dependencies if: steps.cache.outputs.cache-hit != 'true' run: |