Override incorrect Windows test error #1060
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test | |
# On all pushes to branches and pull requests in general. | |
on: | |
push: | |
pull_request: | |
permissions: | |
contents: read | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
# Start Linux jobs last since they are fastest to start and complete, and start 3.11 first, | |
# since it pairs wiht macOS+Windows jobs, and 3.5 and 3.6 last since they only run tests and | |
# don't use venv. 3.4 is not supported on GitHub anymore and 3.5 and 3.6 for x64 isn't | |
# produced for ubuntu 22.04. | |
python-version: ['3.11', '3.10', 3.7, 3.8, 3.9, 3.5, 3.6] | |
os: [windows-latest, macos-latest, ubuntu-latest] | |
# Choose test script depending on OS. | |
include: | |
- os: ubuntu-latest | |
test_script_name: ./misc/actions/test.sh | |
- os: macos-latest | |
test_script_name: ./misc/actions/test.sh | |
- os: windows-latest | |
test_script_name: ./misc/actions/test.ps1 | |
exclude: | |
# Only test on macOS and Windows with Python 3.11. | |
# But do test 3.5 and 3.6 on macOS because they aren't compiled for x64 on Ubuntu 22.04. | |
# - os: macos-latest | |
# python-version: 3.5 | |
# - os: macos-latest | |
# python-version: 3.6 | |
- os: macos-latest | |
python-version: 3.7 | |
- os: macos-latest | |
python-version: 3.8 | |
- os: macos-latest | |
python-version: 3.9 | |
- os: macos-latest | |
python-version: '3.10' | |
- os: windows-latest | |
python-version: 3.5 | |
- os: windows-latest | |
python-version: 3.6 | |
- os: windows-latest | |
python-version: 3.7 | |
- os: windows-latest | |
python-version: 3.8 | |
- os: windows-latest | |
python-version: 3.9 | |
- os: windows-latest | |
python-version: '3.10' | |
# Ignore 3.5 and 3.6 on Linux because it isn't compiled for x64 on Ubuntu 22.04. | |
# Test on macOS instead. | |
- os: ubuntu-latest | |
python-version: 3.5 | |
- os: ubuntu-latest | |
python-version: 3.6 | |
steps: | |
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# The caches need to have the python version included since the | |
# "misc/.coverage-requirements.txt" does not have version-pinning. | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 | |
if: startsWith(matrix.os, 'ubuntu-latest') | |
with: | |
path: ~/.cache/pip | |
key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/.*-requirements.txt') }} | |
restore-keys: | | |
${{ matrix.os }}-pip-${{ matrix.python-version }}- | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 | |
if: startsWith(matrix.os, 'macos-latest') | |
with: | |
path: ~/Library/Caches/pip | |
key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/.*-requirements.txt') }} | |
restore-keys: | | |
${{ matrix.os }}-pip-${{ matrix.python-version }}- | |
- uses: actions/cache@704facf57e6136b1bc63b828d79edcd491f0ee84 | |
if: startsWith(matrix.os, 'windows-latest') | |
with: | |
path: ~\AppData\Local\pip\Cache | |
key: ${{ matrix.os }}-pip-${{ matrix.python-version }}-${{ hashFiles('**/.*-requirements.txt') }} | |
restore-keys: | | |
${{ matrix.os }}-pip-${{ matrix.python-version }}- | |
- name: Test and coverage | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
COVERALLS_REPO_TOKEN: ${{ secrets.COVERALLS_REPO_TOKEN }} | |
COVERALLS_FLAG_NAME: ${{ matrix.os }}-${{ matrix.python-version }} | |
COVERALLS_PARALLEL: true | |
run: ${{ matrix.test_script_name }} | |
# When all parallel tests are done and uploaded, the coveralls session can be signalled as | |
# finished. | |
finish: | |
permissions: | |
checks: write # for coverallsapp/github-action to create new checks | |
needs: test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: coverallsapp/github-action@3dfc5567390f6fa9267c0ee9c251e4c8c3f18949 | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
parallel-finished: true |