2022-03-19 19:56:05 +08:00
|
|
|
name: test
|
2019-12-19 04:56:33 +08:00
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
2021-03-10 04:56:16 +08:00
|
|
|
- main
|
2020-01-25 22:31:21 +08:00
|
|
|
- "[0-9]+.[0-9]+.x"
|
2022-01-02 05:36:10 +08:00
|
|
|
- "test-me-*"
|
2020-01-15 07:34:12 +08:00
|
|
|
tags:
|
2020-10-17 23:55:30 +08:00
|
|
|
- "[0-9]+.[0-9]+.[0-9]+"
|
|
|
|
- "[0-9]+.[0-9]+.[0-9]+rc[0-9]+"
|
2020-01-15 07:34:12 +08:00
|
|
|
|
2019-12-19 04:56:33 +08:00
|
|
|
pull_request:
|
|
|
|
branches:
|
2021-03-10 04:56:16 +08:00
|
|
|
- main
|
2020-01-25 22:31:21 +08:00
|
|
|
- "[0-9]+.[0-9]+.x"
|
2021-05-16 16:17:05 +08:00
|
|
|
|
2021-05-04 23:42:13 +08:00
|
|
|
env:
|
|
|
|
PYTEST_ADDOPTS: "--color=yes"
|
2019-12-19 04:56:33 +08:00
|
|
|
|
2023-02-13 08:37:40 +08:00
|
|
|
# Cancel running jobs for the same workflow and branch.
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
2021-05-16 16:17:05 +08:00
|
|
|
# Set permissions at the job level.
|
|
|
|
permissions: {}
|
|
|
|
|
2019-12-19 04:56:33 +08:00
|
|
|
jobs:
|
|
|
|
build:
|
|
|
|
runs-on: ${{ matrix.os }}
|
2022-01-27 20:33:20 +08:00
|
|
|
timeout-minutes: 45
|
2021-05-16 16:17:05 +08:00
|
|
|
permissions:
|
|
|
|
contents: read
|
2019-12-19 04:56:33 +08:00
|
|
|
|
|
|
|
strategy:
|
|
|
|
fail-fast: false
|
|
|
|
matrix:
|
|
|
|
name: [
|
|
|
|
"windows-py38",
|
2023-07-01 06:19:19 +08:00
|
|
|
"windows-py38-pluggy",
|
2021-03-26 18:27:41 +08:00
|
|
|
"windows-py39",
|
|
|
|
"windows-py310",
|
2022-02-11 23:20:42 +08:00
|
|
|
"windows-py311",
|
2023-04-11 15:20:19 +08:00
|
|
|
"windows-py312",
|
2019-12-19 04:56:33 +08:00
|
|
|
|
|
|
|
"ubuntu-py38",
|
2023-07-01 06:19:19 +08:00
|
|
|
"ubuntu-py38-pluggy",
|
|
|
|
"ubuntu-py38-freeze",
|
2020-05-07 20:26:55 +08:00
|
|
|
"ubuntu-py39",
|
2021-03-26 18:27:41 +08:00
|
|
|
"ubuntu-py310",
|
2022-02-11 23:20:42 +08:00
|
|
|
"ubuntu-py311",
|
2023-04-11 15:20:19 +08:00
|
|
|
"ubuntu-py312",
|
2019-12-19 04:56:33 +08:00
|
|
|
"ubuntu-pypy3",
|
|
|
|
|
2023-07-01 06:19:19 +08:00
|
|
|
"macos-py38",
|
2022-02-04 19:11:30 +08:00
|
|
|
"macos-py39",
|
|
|
|
"macos-py310",
|
2023-04-11 15:20:19 +08:00
|
|
|
"macos-py312",
|
2019-12-19 04:56:33 +08:00
|
|
|
|
2020-01-24 07:22:24 +08:00
|
|
|
"docs",
|
|
|
|
"doctesting",
|
2020-09-20 02:56:52 +08:00
|
|
|
"plugins",
|
2019-12-19 04:56:33 +08:00
|
|
|
]
|
|
|
|
|
|
|
|
include:
|
|
|
|
- name: "windows-py38"
|
|
|
|
python: "3.8"
|
|
|
|
os: windows-latest
|
2020-05-01 23:56:06 +08:00
|
|
|
tox_env: "py38-unittestextras"
|
2020-01-28 07:56:13 +08:00
|
|
|
use_coverage: true
|
2023-07-01 06:19:19 +08:00
|
|
|
- name: "windows-py38-pluggy"
|
|
|
|
python: "3.8"
|
|
|
|
os: windows-latest
|
|
|
|
tox_env: "py38-pluggymain-pylib-xdist"
|
2021-03-26 18:27:41 +08:00
|
|
|
- name: "windows-py39"
|
|
|
|
python: "3.9"
|
|
|
|
os: windows-latest
|
|
|
|
tox_env: "py39-xdist"
|
|
|
|
- name: "windows-py310"
|
2022-02-11 19:49:11 +08:00
|
|
|
python: "3.10"
|
2021-03-26 18:27:41 +08:00
|
|
|
os: windows-latest
|
|
|
|
tox_env: "py310-xdist"
|
2022-02-11 23:20:42 +08:00
|
|
|
- name: "windows-py311"
|
2023-04-11 15:20:19 +08:00
|
|
|
python: "3.11"
|
2022-02-11 23:20:42 +08:00
|
|
|
os: windows-latest
|
|
|
|
tox_env: "py311"
|
2023-04-11 15:20:19 +08:00
|
|
|
- name: "windows-py312"
|
|
|
|
python: "3.12-dev"
|
|
|
|
os: windows-latest
|
|
|
|
tox_env: "py312"
|
2019-12-19 04:56:33 +08:00
|
|
|
|
|
|
|
- name: "ubuntu-py38"
|
|
|
|
python: "3.8"
|
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py38-xdist"
|
2023-07-01 06:19:19 +08:00
|
|
|
- name: "ubuntu-py38-pluggy"
|
|
|
|
python: "3.8"
|
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py38-pluggymain-pylib-xdist"
|
|
|
|
- name: "ubuntu-py38-freeze"
|
|
|
|
python: "3.8"
|
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py38-freeze"
|
2020-05-07 20:26:55 +08:00
|
|
|
- name: "ubuntu-py39"
|
2020-11-01 04:16:07 +08:00
|
|
|
python: "3.9"
|
2020-05-07 20:26:55 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py39-xdist"
|
2021-03-26 18:27:41 +08:00
|
|
|
- name: "ubuntu-py310"
|
2022-02-11 19:49:11 +08:00
|
|
|
python: "3.10"
|
2021-03-26 18:27:41 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py310-xdist"
|
2022-02-11 23:20:42 +08:00
|
|
|
- name: "ubuntu-py311"
|
2023-04-11 15:20:19 +08:00
|
|
|
python: "3.11"
|
2022-02-11 23:20:42 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py311"
|
fallback to native traceback when handling ExceptionGroup (take 2) [SQUASH] (#10209)
* Squashed commit of the following:
commit 41d339c46763bbe26123e1e6504b6e32290e33e1
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 17:01:04 2022 +0800
test in all py versions
commit b3572a5a12672228c3276fc8c8e05980dfb7888a
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 16:41:06 2022 +0800
add test
commit 7166a2a51e4f99046b028b663c193d8b558c7fd4
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 16:00:07 2022 +0800
update changelog
commit b958c73d489157f0c0d4e46425083a5e2e2bc851
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Thu Jun 23 07:50:52 2022 +0000
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
commit ea7f376c6ca37c40c83df0e4a1cfaaedb34bae91
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 15:48:21 2022 +0800
Fix MyPy
commit 97469beb1da40257e9a061a5e19548546c9312c4
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 15:03:48 2022 +0800
fix if ExceptionGroup not exist
commit 84e553642cd69b4d499231d733df91ebfa84c7ad
Author: pre-commit-ci[bot] <66853113+pre-commit-ci[bot]@users.noreply.github.com>
Date: Thu Jun 23 03:43:27 2022 +0000
[pre-commit.ci] auto fixes from pre-commit.com hooks
for more information, see https://pre-commit.ci
commit 76bbef449b88bbd74fb5cca3b5293337a624ef03
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 11:40:41 2022 +0800
adding changelog
commit db82bebc5a4969e2083adcd97bdfd2a63bb17d98
Author: Cheukting <cheukting.ho@gmail.com>
Date: Thu Jun 23 11:33:10 2022 +0800
fall back to native when handeling to exception groups
* Typed ExceptionGroupTypes and changed to BaseExceptionGroup, fixed exceptionchain (excinfo->excinfo_, set reprcrash. Extended tests, though they're wip.
* added exceptiongroup to pre-commit-config, moved away from tuple to directly defining BaseExceptionGroup, added block comment, added match line for inner exception, changked mark.skipif to importorskip to not need top-level import, changed tox.ini a bit - only uncovered should now be py37 without exceptiongroup, due to hypothesis
* added py311-exceptiongroup to github CI, exceptiongroup is now a hard dependency on py<3.11, renamed bad variable names
* added use_coverage to ubuntu-py311
* import BaseExceptionGroup with explicit version check instead of try/catch
* removed from CI, added comments to tox and pre-commit
2022-08-18 00:16:32 +08:00
|
|
|
use_coverage: true
|
2023-04-11 15:20:19 +08:00
|
|
|
- name: "ubuntu-py312"
|
|
|
|
python: "3.12-dev"
|
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "py312"
|
|
|
|
use_coverage: true
|
2019-12-19 04:56:33 +08:00
|
|
|
- name: "ubuntu-pypy3"
|
2023-07-01 06:19:19 +08:00
|
|
|
python: "pypy-3.8"
|
2019-12-19 04:56:33 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "pypy3-xdist"
|
|
|
|
|
2023-07-01 06:19:19 +08:00
|
|
|
- name: "macos-py38"
|
|
|
|
python: "3.8"
|
2019-12-19 04:56:33 +08:00
|
|
|
os: macos-latest
|
2023-07-01 06:19:19 +08:00
|
|
|
tox_env: "py38-xdist"
|
2022-02-04 19:11:30 +08:00
|
|
|
- name: "macos-py39"
|
|
|
|
python: "3.9"
|
|
|
|
os: macos-latest
|
|
|
|
tox_env: "py39-xdist"
|
2023-04-11 15:20:19 +08:00
|
|
|
use_coverage: true
|
2022-02-04 19:11:30 +08:00
|
|
|
- name: "macos-py310"
|
|
|
|
python: "3.10"
|
|
|
|
os: macos-latest
|
|
|
|
tox_env: "py310-xdist"
|
2023-04-11 15:20:19 +08:00
|
|
|
- name: "macos-py312"
|
|
|
|
python: "3.12-dev"
|
|
|
|
os: macos-latest
|
|
|
|
tox_env: "py312-xdist"
|
2019-12-19 04:56:33 +08:00
|
|
|
|
2020-09-20 02:56:52 +08:00
|
|
|
- name: "plugins"
|
2021-12-28 17:01:23 +08:00
|
|
|
python: "3.9"
|
2020-09-20 02:56:52 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "plugins"
|
|
|
|
|
2020-01-24 07:22:24 +08:00
|
|
|
- name: "docs"
|
2023-07-01 06:19:19 +08:00
|
|
|
python: "3.8"
|
2020-01-24 07:22:24 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "docs"
|
|
|
|
- name: "doctesting"
|
2023-07-01 06:19:19 +08:00
|
|
|
python: "3.8"
|
2020-01-24 07:22:24 +08:00
|
|
|
os: ubuntu-latest
|
|
|
|
tox_env: "doctesting"
|
2020-01-28 07:56:13 +08:00
|
|
|
use_coverage: true
|
2019-12-19 04:56:33 +08:00
|
|
|
|
|
|
|
steps:
|
2022-10-09 20:27:35 +08:00
|
|
|
- uses: actions/checkout@v3
|
2020-06-02 15:29:36 +08:00
|
|
|
with:
|
|
|
|
fetch-depth: 0
|
2021-05-16 16:17:05 +08:00
|
|
|
persist-credentials: false
|
|
|
|
|
2019-12-19 04:56:33 +08:00
|
|
|
- name: Set up Python ${{ matrix.python }}
|
2022-10-09 20:27:35 +08:00
|
|
|
uses: actions/setup-python@v4
|
2019-12-19 04:56:33 +08:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python }}
|
2023-06-09 16:28:10 +08:00
|
|
|
check-latest: ${{ endsWith(matrix.python, '-dev') }}
|
2021-05-16 16:17:05 +08:00
|
|
|
|
2019-12-19 04:56:33 +08:00
|
|
|
- name: Install dependencies
|
|
|
|
run: |
|
|
|
|
python -m pip install --upgrade pip
|
2020-01-08 07:03:38 +08:00
|
|
|
pip install tox coverage
|
|
|
|
|
|
|
|
- name: Test without coverage
|
2020-01-28 07:56:13 +08:00
|
|
|
if: "! matrix.use_coverage"
|
2020-01-08 07:03:38 +08:00
|
|
|
run: "tox -e ${{ matrix.tox_env }}"
|
|
|
|
|
|
|
|
- name: Test with coverage
|
2020-01-28 07:56:13 +08:00
|
|
|
if: "matrix.use_coverage"
|
2020-12-23 12:27:00 +08:00
|
|
|
run: "tox -e ${{ matrix.tox_env }}-coverage"
|
2020-01-08 07:03:38 +08:00
|
|
|
|
2021-11-01 23:41:56 +08:00
|
|
|
- name: Generate coverage report
|
|
|
|
if: "matrix.use_coverage"
|
|
|
|
run: python -m coverage xml
|
|
|
|
|
|
|
|
- name: Upload coverage to Codecov
|
|
|
|
if: "matrix.use_coverage"
|
2022-10-09 20:27:35 +08:00
|
|
|
uses: codecov/codecov-action@v3
|
2022-10-22 01:11:43 +08:00
|
|
|
continue-on-error: true
|
2021-11-01 23:41:56 +08:00
|
|
|
with:
|
|
|
|
fail_ci_if_error: true
|
|
|
|
files: ./coverage.xml
|
|
|
|
verbose: true
|
2023-02-13 08:37:40 +08:00
|
|
|
|
|
|
|
check-package:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Build and Check Package
|
|
|
|
uses: hynek/build-and-inspect-python-package@v1.5
|