Skip to content

test

test #51

Workflow file for this run

name: test
on:
push:
branches: [main]
pull_request:
branches: [main]
schedule:
# Midnight UTC:
- cron: "0 0 * * *"
workflow_dispatch:
jobs:
test:
runs-on: ${{ matrix.os }}
permissions:
pull-requests: write
name: ${{ matrix.os }} - ${{ matrix.python }}
if: ${{ github.event_name != 'schedule' || (github.repository == 'python/pyperformance' && github.event_name == 'schedule') }}
strategy:
fail-fast: false
matrix:
# Test all supported versions on Ubuntu:
os: [ubuntu-latest]
python: ["3.7", "3.8", "3.9", "3.10", "3.11"]
experimental: [false]
include:
# As the experimental task for the dev version.
- os: ubuntu-latest
python: "3.12-dev"
experimental: true
# Also test PyPy, macOS, and Windows:
- os: ubuntu-latest
python: pypy-3.9
experimental: false
- os: ubuntu-latest
python: pypy-3.8
experimental: false
- os: ubuntu-latest
python: pypy-3.7
experimental: false
- os: macos-latest
python: "3.10"
experimental: false
- os: windows-latest
python: "3.10"
experimental: false
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v4
if: "!endsWith(matrix.python, '-dev')"
with:
python-version: ${{ matrix.python }}
- name: Set up Python ${{ matrix.python }} using deadsnakes
uses: deadsnakes/action@v3.0.0
if: "endsWith(matrix.python, '-dev')"
with:
python-version: ${{ matrix.python }}
- name: Install
# pyperformance must be installed:
# pyperformance/tests/test_compare.py imports it
run: |
python -m pip install --upgrade pip setuptools
python -m pip install -e .
- name: Display Python version
run: python -c "import sys; print(sys.version)"
- name: Run Tests
id: pyperformance
run: python -u -m pyperformance.tests
continue-on-error: ${{ matrix.experimental }}