Skip to content

MNT: Use 1.5.10-0 since the Windows issue is not solved yet #18

MNT: Use 1.5.10-0 since the Windows issue is not solved yet

MNT: Use 1.5.10-0 since the Windows issue is not solved yet #18

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 "TODAY=$(date +'%Y-%m-%d')" >> $GITHUB_ENV
echo "CONDA_ENV_FILE=ci/requirements/environment.yml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
- name: Setup micromamba
uses: mamba-org/setup-micromamba@v2
with:
micromamba-version: 1.5.10-0
environment-file: ${{ env.CONDA_ENV_FILE }}
environment-name: ${{ env.REPO_NAME }}-tests
create-args: >-
python=${{ env.PYTHON_VERSION }}
post-cleanup: 'all'
cache-environment: true
cache-environment-key: ${{runner.os}}-${{runner.arch}}-py${{env.PYTHON_VERSION}}-${{env.TODAY}}-${{hashFiles(env.CONDA_ENV_FILE)}}
- 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: Version info
run: |-
NAME="$(echo ${REPO_NAME} | tr - _)"
python -c "import ${NAME}; ${NAME}.show_versions()"
- name: Run pytest
run: |-
pytest --cov --cov-append
- name: Run codecov and upload the report
uses: codecov/codecov-action@v4
with:
file: ./coverage.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}