Skip to content

API Enhancement: Finalized 'fast_track' and 'register_fast_track' roo… #951

API Enhancement: Finalized 'fast_track' and 'register_fast_track' roo…

API Enhancement: Finalized 'fast_track' and 'register_fast_track' roo… #951

Workflow file for this run

name: CI
on:
push:
branches: [ "main" ]
paths-ignore:
- '**/*.md'
- 'docs/**'
pull_request:
branches: [ "main" ]
paths-ignore:
- '**/*.md'
- 'docs/**'
workflow_dispatch:
jobs:
test:
name: Test on ubuntu-latest, Python 3.13
if: >
!(
(github.event_name == 'push' && contains(github.event.head_commit.message, '[skip ci]'))
||
(github.event_name == 'pull_request' && contains(github.event.pull_request.title, '[skip ci]'))
||
(github.event_name == 'pull_request' && contains(github.event.pull_request.head.ref, 'skip-ci'))
)
&&
(
github.event_name == 'push'
|| github.event_name == 'pull_request'
|| github.event_name == 'workflow_dispatch'
)
runs-on: ubuntu-latest
timeout-minutes: 25
concurrency:
group: ci-fast-${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Additional info about the build
shell: bash
run: |
uname -a
- name: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.13"
- name: Setup conda env
uses: mamba-org/setup-micromamba@v2
with:
environment-file: devtools/conda-envs/test_env.yaml
environment-name: test
condarc: |
channels:
- uibcdf
- conda-forge
channel_priority: strict
create-args: >-
python=3.13
- name: Info conda
shell: bash -l {0}
run: |
micromamba activate test
micromamba info
micromamba list
- name: Install package
shell: bash -l {0}
run: |
python -m pip install . --no-deps
- name: Test import module
shell: bash -l {0}
run: |
echo "::group::Importing module from home directory"
cd
pwd
echo 'import pyunitwizard; print("Version of the package: {}".format(pyunitwizard.__version__))' | python
echo "::endgroup::"
- name: Run tests
shell: bash -l {0}
run: |
export PYTHONPATH=$PYTHONPATH:$(pwd)
pytest -v --cov-config=.coveragerc --cov=pyunitwizard --cov-report=xml --junitxml=junit.xml --color=yes
- name: Check coverage
shell: bash -l {0}
run: |
cat ./coverage.xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
verbose: true
file: ./coverage.xml
flags: unittests
name: codecov-ubuntu-latest-py3.13
token: ${{ secrets.CODECOV_TOKEN }}
- name: Upload test results to Codecov
uses: codecov/test-results-action@v1
with:
token: ${{ secrets.CODECOV_TOKEN }}