Skip to content

feat: add codspeed for continuous benchmarking #412

feat: add codspeed for continuous benchmarking

feat: add codspeed for continuous benchmarking #412

Workflow file for this run

name: Tests
on: [push, pull_request]
jobs:
benchmarks:
name: 📈 Benchmarks
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: pipx install poetry
- uses: actions/setup-python@v5
id: setup-python
with:
python-version: "3.12"
architecture: x64
- run: poetry env use 3.12
- run: poetry install --with test
- name: Run benchmarks
uses: CodSpeedHQ/action@v3
with:
token: ${{ secrets.CODSPEED_TOKEN }}
run: poetry run pytest tests --benchmark-enable --codspeed
tests:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.7', '3.8', '3.9', '3.10', '3.11', '3.12', 'pypy3.9', 'pypy3.10']
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install "tox>=3.28,<5" "tox-gh-actions>=3.2,<4"
- name: Run unit tests with tox
run: tox