name: Run tests on: # run on push in master or rel_* branches excluding changes are only on doc or example folders push: branches: - master - "rel_*" # branches used to test the workflow - "workflow_test_*" paths-ignore: - "doc/**" - "examples/**" env: # global env to all steps TOX_WORKERS: -n2 jobs: run-test: name: ${{ matrix.python-version }}-${{ matrix.build-type }}-${{ matrix.architecture }}-${{ matrix.os }} runs-on: ${{ matrix.os }} strategy: # run this job using this matrix, excluding some combinations below. matrix: os: - "ubuntu-latest" - "windows-latest" - "macos-latest" python-version: - "2.7" - "3.5" - "3.6" - "3.7" - "3.8" build-type: - "cext" - "nocext" architecture: - x64 - x86 include: # the mock reconnect test seems to fail on the ci in windows - os: "windows-latest" pytest-args: "-k 'not MockReconnectTest'" # python 2.7 or 3.5 on windows seem to fail also test_hanging_connect_within_overflow - os: "windows-latest" python-version: "3.5" pytest-args: "-k 'not MockReconnectTest and not test_hanging_connect_within_overflow'" - os: "windows-latest" python-version: "2.7" pytest-args: "-k 'not MockReconnectTest and not test_hanging_connect_within_overflow'" exclude: # c-extensions fail to build on windows for python 3.5 and 2.7 - os: "windows-latest" python-version: "2.7" build-type: "cext" - os: "windows-latest" python-version: "3.5" build-type: "cext" # linux and osx do not have x86 python - os: "ubuntu-latest" architecture: x86 - os: "macos-latest" architecture: x86 fail-fast: false # steps to run in each job. Some are github actions, others run shell commands steps: - name: Checkout repo uses: actions/checkout@v2 - name: Set up python uses: actions/setup-python@v1 with: python-version: ${{ matrix.python-version }} architecture: ${{ matrix.architecture }} - name: Install dependencies run: | python -m pip install --upgrade pip pip install --upgrade tox setuptools pip list - name: Run tests run: tox -e github-${{ matrix.build-type }} -- -q --nomemory ${{ matrix.pytest-args }}