Rework conda release test: big matrix, no tox involved #1
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test Conda-forge release | |
on: | |
workflow_call: | |
inputs: | |
version: | |
description: 'The Euphonic release version to test e.g. 0.6.1' | |
required: true | |
type: string | |
workflow_dispatch: | |
inputs: | |
version: | |
description: 'The Euphonic release version to test e.g. 0.6.1' | |
required: true | |
jobs: | |
test: | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest, macos-13] | |
python-version: [3.10, 3.11, 3.12] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Delete source (to be sure we are testing Conda package!) | |
run: rm -rf euphonic | |
- uses: actions/setup-miniconda | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install euphonic and dependencies from Conda-forge | |
shell: bash -el {0} | |
env: | |
EUPHONIC_VERSION: ${{ inputs.version }} | |
EXTRA_PACKAGES: matplotlib-base pyyaml h5py | |
TESTING_PACKAGES: pytest=7.* coverage pytest-mock pytest-lazy-fixture pytest-xvfb python-slugify | |
run: | | |
conda install -c conda-forge euphonic=$EUPHONIC_VERSION $EXTRA_PACKAGES $TESTING_PACKAGES | |
# - name: Update pip and install testing dependencies | |
# shell: bash -l {0} | |
# run: | | |
# python -m pip install --upgrade pip | |
# python -m pip install -r tests_and_analysis/ci_requirements.txt | |
- name: Run tests | |
shell: bash -el {0} | |
run: python tests_and_analysis/test/run_tests.py --report -m "not brille" | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Unit test results ${{ matrix.os }} ${{ matrix.python-version }} | |
path: tests_and_analysis/test/reports/junit_report*.xml | |
publish-test-results: | |
needs: test | |
runs-on: ubuntu-latest | |
if: success() || failure() | |
steps: | |
- name: Download Artifacts | |
uses: actions/download-artifact@v4 | |
with: | |
path: artifacts | |
- name: Publish test results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
junit_files: artifacts/**/junit_report*.xml |