Skip to content

[nc-time-axis] QA refresh linter hooks #349

[nc-time-axis] QA refresh linter hooks

[nc-time-axis] QA refresh linter hooks #349

Workflow file for this run

# Reference:
# - 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:
- "main"
- "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"
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
python-version: ["39", "310", "311"]
include:
- python-version: "311"
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: "tests (py${{ matrix.python-version }})"
run: |
python -m pip install --no-deps --editable .
pytest ${{ matrix.cov-report }}
${{ matrix.codecov }}