2019-09-22 17:09:27 +03:00
|
|
|
name: Test
|
|
|
|
|
|
|
|
on: [push, pull_request]
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
|
|
|
|
strategy:
|
2019-10-12 12:14:49 +03:00
|
|
|
fail-fast: false
|
2019-09-22 17:09:27 +03:00
|
|
|
matrix:
|
2019-09-22 23:09:59 +03:00
|
|
|
os: [
|
2019-11-06 19:27:06 +03:00
|
|
|
"ubuntu-latest",
|
|
|
|
"macOS-latest",
|
2019-09-22 23:09:59 +03:00
|
|
|
]
|
2019-09-22 17:09:27 +03:00
|
|
|
python-version: [
|
|
|
|
"pypy3",
|
2020-10-14 19:31:21 +03:00
|
|
|
"3.10-dev",
|
2020-10-06 17:28:42 +03:00
|
|
|
"3.9",
|
2019-11-04 23:55:50 +03:00
|
|
|
"3.8",
|
2019-09-22 17:09:27 +03:00
|
|
|
"3.7",
|
|
|
|
"3.6",
|
|
|
|
]
|
|
|
|
include:
|
|
|
|
- python-version: "3.6"
|
|
|
|
env: PYTHONOPTIMIZE=1
|
2020-06-27 14:39:44 +03:00
|
|
|
- python-version: "3.7"
|
|
|
|
env: PYTHONOPTIMIZE=2
|
2020-01-24 15:24:31 +03:00
|
|
|
# Include new variables for Codecov
|
|
|
|
- os: ubuntu-latest
|
|
|
|
codecov-flag: GHA_Ubuntu
|
|
|
|
- os: macOS-latest
|
|
|
|
codecov-flag: GHA_macOS
|
|
|
|
|
2019-09-22 23:09:59 +03:00
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
name: ${{ matrix.os }} Python ${{ matrix.python-version }}
|
2019-09-22 17:09:27 +03:00
|
|
|
|
|
|
|
steps:
|
2020-03-31 22:53:35 +03:00
|
|
|
- uses: actions/checkout@v2
|
2019-09-22 17:09:27 +03:00
|
|
|
|
2020-06-30 22:26:41 +03:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
|
|
|
uses: actions/setup-python@v2
|
2019-11-04 10:06:09 +03:00
|
|
|
with:
|
2020-06-30 22:26:41 +03:00
|
|
|
python-version: ${{ matrix.python-version }}
|
2019-11-04 10:06:09 +03:00
|
|
|
|
2020-06-30 22:26:41 +03:00
|
|
|
- name: Get pip cache dir
|
|
|
|
id: pip-cache
|
|
|
|
run: |
|
2020-10-29 14:41:29 +03:00
|
|
|
echo "::set-output name=dir::$(python3 -m pip cache dir)"
|
2019-11-04 10:06:09 +03:00
|
|
|
|
2020-06-30 22:26:41 +03:00
|
|
|
- name: pip cache
|
2020-06-30 22:01:19 +03:00
|
|
|
uses: actions/cache@v2
|
2019-11-04 10:06:09 +03:00
|
|
|
with:
|
2020-06-30 22:26:41 +03:00
|
|
|
path: ${{ steps.pip-cache.outputs.dir }}
|
2019-11-17 14:24:37 +03:00
|
|
|
key:
|
2020-01-08 16:41:48 +03:00
|
|
|
${{ matrix.os }}-${{ matrix.python-version }}-${{ hashFiles('**/.ci/*.sh') }}
|
2019-11-17 14:24:37 +03:00
|
|
|
restore-keys: |
|
|
|
|
${{ matrix.os }}-${{ matrix.python-version }}-
|
2019-11-04 10:06:09 +03:00
|
|
|
|
2019-12-09 23:35:31 +03:00
|
|
|
- name: Build system information
|
|
|
|
run: python .github/workflows/system-info.py
|
|
|
|
|
2019-09-22 23:09:59 +03:00
|
|
|
- name: Install Linux dependencies
|
2019-10-09 15:10:27 +03:00
|
|
|
if: startsWith(matrix.os, 'ubuntu')
|
2019-09-22 17:09:27 +03:00
|
|
|
run: |
|
2020-01-08 16:41:48 +03:00
|
|
|
.ci/install.sh
|
2020-08-13 12:39:08 +03:00
|
|
|
env:
|
|
|
|
GHA_PYTHON_VERSION: ${{ matrix.python-version }}
|
2019-09-22 17:09:27 +03:00
|
|
|
|
2019-09-22 23:09:59 +03:00
|
|
|
- name: Install macOS dependencies
|
2019-10-09 15:10:27 +03:00
|
|
|
if: startsWith(matrix.os, 'macOS')
|
2019-09-22 23:09:59 +03:00
|
|
|
run: |
|
|
|
|
.github/workflows/macos-install.sh
|
2020-08-13 12:59:52 +03:00
|
|
|
env:
|
|
|
|
GHA_PYTHON_VERSION: ${{ matrix.python-version }}
|
2019-09-22 23:09:59 +03:00
|
|
|
|
2019-09-23 17:02:09 +03:00
|
|
|
- name: Build
|
|
|
|
run: |
|
2020-01-08 16:41:48 +03:00
|
|
|
.ci/build.sh
|
2019-09-23 17:02:09 +03:00
|
|
|
|
2019-09-22 17:09:27 +03:00
|
|
|
- name: Test
|
|
|
|
run: |
|
2020-01-08 16:41:48 +03:00
|
|
|
.ci/test.sh
|
2019-09-22 17:09:27 +03:00
|
|
|
|
2020-01-25 05:30:21 +03:00
|
|
|
- name: Prepare to upload errors
|
|
|
|
if: failure()
|
|
|
|
run: |
|
|
|
|
mkdir -p Tests/errors
|
|
|
|
shell: pwsh
|
|
|
|
|
2019-10-12 13:59:03 +03:00
|
|
|
- name: Upload errors
|
2020-06-30 22:01:19 +03:00
|
|
|
uses: actions/upload-artifact@v2
|
2019-10-12 13:59:03 +03:00
|
|
|
if: failure()
|
|
|
|
with:
|
|
|
|
name: errors
|
|
|
|
path: Tests/errors
|
|
|
|
|
2020-04-03 18:07:09 +03:00
|
|
|
- name: Docs
|
2020-10-30 15:51:41 +03:00
|
|
|
if: startsWith(matrix.os, 'ubuntu') && matrix.python-version == 3.9
|
2020-04-03 18:07:09 +03:00
|
|
|
run: |
|
2020-10-29 14:41:29 +03:00
|
|
|
python3 -m pip install sphinx-removed-in sphinx-rtd-theme
|
2020-04-03 18:07:09 +03:00
|
|
|
make doccheck
|
|
|
|
|
2019-09-22 17:09:27 +03:00
|
|
|
- name: After success
|
|
|
|
run: |
|
2020-01-08 16:41:48 +03:00
|
|
|
.ci/after_success.sh
|
2019-11-20 15:00:59 +03:00
|
|
|
|
|
|
|
- name: Upload coverage
|
2020-02-22 14:47:28 +03:00
|
|
|
run: bash <(curl -s https://codecov.io/bash) -F ${{ matrix.codecov-flag }}
|
|
|
|
env:
|
|
|
|
CODECOV_NAME: ${{ matrix.os }} Python ${{ matrix.python-version }}
|
2020-09-23 09:56:17 +03:00
|
|
|
|
|
|
|
success:
|
|
|
|
needs: build
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
name: Test Successful
|
|
|
|
steps:
|
|
|
|
- name: Success
|
|
|
|
run: echo Test Successful
|