uvloop/.github/workflows/tests.yml

75 lines
1.8 KiB
YAML
Raw Normal View History

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:
matrix:
python-version: ["3.7", "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:
2022-07-16 20:59:22 +00:00
- uses: actions/checkout@v3
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.
uses: edgedb/action-release/validate-pr@master
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 }}
2022-07-16 20:59:22 +00:00
uses: actions/setup-python@v4
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
if: steps.release.outputs.version == 0
2019-10-25 13:47:15 +00:00
run: |
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)
# 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
# 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
steps:
- run: echo OK