2019-10-25 13:47:15 +00:00
|
|
|
name: Tests
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
- ci
|
|
|
|
pull_request:
|
|
|
|
branches:
|
|
|
|
- master
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
test:
|
|
|
|
runs-on: ${{ matrix.os }}
|
|
|
|
strategy:
|
2024-08-15 16:39:16 +00:00
|
|
|
fail-fast: false
|
2019-10-25 13:47:15 +00:00
|
|
|
matrix:
|
2023-10-22 18:04:03 +00:00
|
|
|
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
|
2020-12-06 17:46:20 +00:00
|
|
|
os: [ubuntu-latest, macos-latest]
|
2019-10-25 13:47:15 +00:00
|
|
|
|
2021-08-10 17:34:30 +00:00
|
|
|
env:
|
|
|
|
PIP_DISABLE_PIP_VERSION_CHECK: 1
|
|
|
|
|
2019-10-25 13:47:15 +00:00
|
|
|
steps:
|
2023-10-22 18:04:03 +00:00
|
|
|
- uses: actions/checkout@8ade135a41bc03ea155e62e844d188df1ea18608 # v4.1.0
|
2019-10-25 13:47:15 +00:00
|
|
|
with:
|
|
|
|
fetch-depth: 50
|
|
|
|
submodules: true
|
|
|
|
|
2020-12-06 17:46:20 +00:00
|
|
|
- name: Check if release PR.
|
2023-10-22 18:04:03 +00:00
|
|
|
uses: edgedb/action-release/validate-pr@bae6b9134e872166b43d218dd79397c851c41c9a
|
2020-12-06 17:46:20 +00:00
|
|
|
id: release
|
|
|
|
with:
|
|
|
|
github_token: ${{ secrets.RELEASE_BOT_GITHUB_TOKEN }}
|
2021-08-07 01:02:12 +00:00
|
|
|
missing_version_ok: yes
|
2020-12-06 17:46:20 +00:00
|
|
|
version_file: uvloop/_version.py
|
|
|
|
version_line_pattern: |
|
|
|
|
__version__\s*=\s*(?:['"])([[:PEP440:]])(?:['"])
|
|
|
|
|
2019-10-25 13:47:15 +00:00
|
|
|
- name: Set up Python ${{ matrix.python-version }}
|
2023-10-22 18:04:03 +00:00
|
|
|
uses: actions/setup-python@65d7f2d534ac1bc67fcd62888c5f4f3d2cb2b236 # v4.7.1
|
2020-12-06 17:46:20 +00:00
|
|
|
if: steps.release.outputs.version == 0
|
2019-10-25 13:47:15 +00:00
|
|
|
with:
|
|
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
|
|
|
|
- name: Install macOS deps
|
2020-12-06 17:46:20 +00:00
|
|
|
if: matrix.os == 'macos-latest' && steps.release.outputs.version == 0
|
2019-10-25 13:47:15 +00:00
|
|
|
run: |
|
2020-12-06 17:46:20 +00:00
|
|
|
brew install gnu-sed libtool autoconf automake
|
|
|
|
|
2019-10-25 13:47:15 +00:00
|
|
|
- name: Install Python Deps
|
2021-01-21 00:01:14 +00:00
|
|
|
if: steps.release.outputs.version == 0
|
2019-10-25 13:47:15 +00:00
|
|
|
run: |
|
2021-01-21 00:01:14 +00:00
|
|
|
pip install -e .[test]
|
2019-10-25 13:47:15 +00:00
|
|
|
|
|
|
|
- name: Test
|
2020-12-06 17:46:20 +00:00
|
|
|
if: steps.release.outputs.version == 0
|
2019-10-25 13:47:15 +00:00
|
|
|
run: |
|
2021-08-10 17:34:30 +00:00
|
|
|
make test
|
|
|
|
|
|
|
|
- name: Test (debug build)
|
2023-10-10 00:28:47 +00:00
|
|
|
# XXX Re-enable 3.12 once we migrate to Cython 3
|
|
|
|
if: steps.release.outputs.version == 0 && matrix.python-version != '3.12'
|
2021-08-10 17:34:30 +00:00
|
|
|
run: |
|
2019-10-25 13:47:15 +00:00
|
|
|
make distclean && make debug && make test
|
2021-01-21 00:01:14 +00:00
|
|
|
|
|
|
|
# This job exists solely to act as the test job aggregate to be
|
|
|
|
# targeted by branch policies.
|
|
|
|
regression-tests:
|
|
|
|
name: "Regression Tests"
|
|
|
|
needs: [test]
|
2021-08-07 01:02:12 +00:00
|
|
|
runs-on: ubuntu-latest
|
2021-01-21 00:01:14 +00:00
|
|
|
|
|
|
|
steps:
|
|
|
|
- run: echo OK
|