Skip to content

chore: update the instructions for PRs. #1

chore: update the instructions for PRs.

chore: update the instructions for PRs. #1

Workflow file for this run

name: CI
on:
push:
branches:
- '**'
tags-ignore:
- '**'
pull_request:
branches:
- '**'
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
name: python ${{ matrix.python-version }}, ${{ matrix.os }}
runs-on: ${{ matrix.os }}
env:
REPO_NAME: ${{ github.event.repository.name }}
defaults:
run:
shell: bash -l {0}
strategy:
matrix:
python-version: [3.9, '3.12']
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- uses: actions/checkout@v4
- name: Set environment variables
run: |-
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
env:
DATE: ${{ steps.date.outputs.time }}
with:
environment-file: ci/requirements/environment.yml
environment-name: ${{ env.REPO_NAME }}-tests
create-args: >-
python=${{ matrix.python-version }}
post-cleanup: all
cache-environment: true
cache-environment-key: ${{runner.os}}-${{runner.arch}}-py${{matrix.python-version}}-${{env.DATE}}
- name: Install error reporter
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.12'
run: |
python -m pip install pytest-github-actions-annotate-failures
- name: Install the package
run: |-
python -m pip install --no-deps .
- name: Run pytest
run: |-
pytest --cov --junitxml=junit.xml
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
if: ${{ !cancelled() }}
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}