Skip to content

new version v2.0.1

new version v2.0.1 #60

Workflow file for this run

name: cdm_reader_mapper Testing Suite
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
pull-requests: read
jobs:
test:
name: py${{ matrix.python-version }}
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash -l {0}
strategy:
fail-fast: false
matrix:
os: ["ubuntu-latest"]
# Bookend python versions
python-version: ["3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
with:
fetch-depth: 0 # Fetch all history for all branches and tags.
- name: Set environment variables
run: |
echo "UV_ENV_FILE=pyproject.toml" >> $GITHUB_ENV
echo "PYTHON_VERSION=${{ matrix.python-version }}" >> $GITHUB_ENV
echo "UV_CACHE_DIR=/tmp/.uv-cache" >> $GITHUB_ENV
- name: Install uv
uses: astral-sh/setup-uv@1edb52594c857e2b5b13128931090f0640537287 # v5.3.0
with:
python-version: ${{ matrix.python-version }}
enable-cache: true
cache-local-path: ${{ env.UV_CACHE_DIR }}
- name: Restore uv cache
uses: actions/cache@v4
with:
path: ${{ env.UV_CACHE_DIR }}
key: uv-${{ runner.os }}-${{runner.arch}}-py${{matrix.python-version}}-${{ hashFiles(env.UV_ENV_FILE) }}
restore-keys: |
uv-${{ runner.os }}-${{runner.arch}}-py${{matrix.python-version}}-${{ hashFiles(env.UV_ENV_FILE) }}
uv-${{ runner.os }}-${{runner.arch}}-py${{matrix.python-version}}
- name: Install cdm reader mapper toolbox
run: |
uv sync --extra dev
- name: Version info
run: |
uv version
uv pip list
- name: Import cdm_reader_mapper toolbox
run: |
python -c "import cdm_reader_mapper"
- name: Run tests
timeout-minutes: 10
run: uv run pytest tests
--cov=cdm_reader_mapper
--cov-report=xml
--junitxml=test-results/${{ runner.os }}-${{ matrix.python-version }}.xml
- name: Upload code coverage to Codecov
uses: codecov/codecov-action@13ce06bfc6bbe3ecf90edbbf1bc32fe5978ca1d3 # v5.3.1
with:
files: ./coverage.xml
flags: unittests
env_vars: RUNNER_OS,PYTHON_VERSION
name: codecov-umbrella
fail_ci_if_error: false
- name: Minimise uv cache
run: uv cache prune --ci