Skip to content

made tests faster

made tests faster #3

Workflow file for this run

name: Tests
on:
push:
branches:
- main
pull_request:
permissions:
contents: read
jobs:
test-fast:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.11", "3.12"]
env:
MPLBACKEND: Agg
MPLCONFIGDIR: /tmp/matplotlib
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install project and dev dependencies
run: pip install -e ".[dev]"
- name: Run Ruff
run: ruff check .
- name: Run fast tests
run: pytest -m "not slow"
test-full:
runs-on: ubuntu-latest
env:
MPLBACKEND: Agg
MPLCONFIGDIR: /tmp/matplotlib
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install project and dev dependencies
run: pip install -e ".[dev]"
- name: Run full test suite
run: pytest
build:
runs-on: ubuntu-latest
env:
MPLBACKEND: Agg
MPLCONFIGDIR: /tmp/matplotlib
steps:
- name: Check out repository
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
cache-dependency-path: |
pyproject.toml
requirements.txt
- name: Upgrade pip
run: python -m pip install --upgrade pip
- name: Install build tooling
run: pip install build twine
- name: Build distributions
run: python -m build
- name: Check distribution metadata
run: twine check dist/*