uvloop/.github/workflows/tests.yml

84 lines
2.0 KiB
YAML
Raw Permalink 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:
fail-fast: false
2019-10-25 13:47:15 +00:00
matrix:
python-version:
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
- "3.13"
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:
- 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.
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 }}
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 }}
allow-prereleases: true
2019-10-25 13:47:15 +00:00
- 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
env:
PIP_PRE: ${{ matrix.python-version == '3.13' && '1' || '0' }}
2019-10-25 13:47:15 +00:00
run: |
pip install -e .[test,dev]
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)
if: steps.release.outputs.version == 0
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