Skip to content

Accepting Ruff, MyPy, NumPydoc pre-commit checks #290

Accepting Ruff, MyPy, NumPydoc pre-commit checks

Accepting Ruff, MyPy, NumPydoc pre-commit checks #290

Workflow file for this run

# Reference:
# - https://github.com/actions/cache
# - https://github.com/actions/checkout
# - https://github.com/actions/download-artifact
# - https://github.com/actions/upload-artifact
# - https://github.com/conda-incubator/setup-miniconda
name: ci-tests
on:
pull_request:
push:
branches:
- "master"
- "v*x"
- "!auto-update-lockfiles"
- "!pre-commit-ci-update-config"
- "!dependabot/*"
tags:
- "v*"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
tests:
name: "tests (py${{ matrix.python-version }} ${{ matrix.os }})"
runs-on: ubuntu-latest
defaults:
run:
shell: bash -l {0}
env:
ENV_NAME: "ci-tests"
CYTHON_COVERAGE: true
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["310", "311", "312"]
include:
- python-version: "312"
cov-report: "--cov-report=xml --cov"
codecov: "codecov"
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: "mambaforge setup (python ${{ matrix.python-version }})"
uses: conda-incubator/setup-miniconda@v3
with:
miniforge-variant: Mambaforge
miniforge-version: latest
channels: conda-forge,defaults
channel-priority: true
auto-update-conda: true
environment-file: "requirements/locks/py${{ matrix.python-version }}-linux-64.lock"
activate-environment: ${{ env.ENV_NAME }}
- name: "stratify tests (py${{ matrix.python-version }})"
run: |
python setup.py build_ext --inplace
python -m pip install --no-deps --editable .
pytest ${{ matrix.cov-report }}
${{ matrix.codecov }}