Skip to content

Fixes unit test after API changes #13

Fixes unit test after API changes

Fixes unit test after API changes #13

Workflow file for this run

name: Testing code
on:
# Trigger the workflow on push
push:
# Every branch
branches:
- '**'
# But do not run this workflow on creating a new tag starting with 'v', e.g. 'v1.0.3' (see pypi-publish.yml)
tags-ignore:
- 'v*'
# Trigger the workflow on pull request
pull_request:
branches:
- '**'
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
# Allow only one concurrent workflow, skipping runs queued between the run in-progress and latest queued.
# And cancel in-progress runs.
concurrency:
group:
${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
jobs:
testing-code:
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, windows-2022, macos-13, macos-14]
python-version: ['3.12']
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Upgrade package installer for Python
shell: bash
run: python -m pip install --upgrade pip
- name: Set up conda (Windows only)
if: runner.os == 'Windows'
uses: s-weigand/setup-conda@v1
with:
update-conda: true
python-version: ${{ matrix.python-version }}
conda-channels: conda-forge
- name: Install libcblas for pdffit (Windows only)
if: runner.os == 'Windows'
shell: bash
run: conda install -y -c conda-forge libcblas
- name: Install Python dependencies
shell: bash
run: python -m pip install -r requirements.txt
- name: Run Python unit tests
shell: bash
run: |
export PYTHONPATH="$(pwd)/src${PYTHONPATH:+:$PYTHONPATH}"
python -m pytest tests/unit_tests/ --color=yes
- name: Run Python functional tests
shell: bash
run: |
export PYTHONPATH="$(pwd)/src${PYTHONPATH:+:$PYTHONPATH}"
python -m pytest tests/functional_tests/ --color=yes -n auto