Run release tests from PyPI and Conda-forge #73
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-release | |
on: | |
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] | |
fail-fast: false | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: 3.8 | |
channels: conda-forge,defaults | |
channel-priority: true | |
- name: Install llvm on Macos | |
if: startsWith(matrix.os, 'macos') | |
run: brew install llvm | |
- name: Update pip and install 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 -l {0} | |
env: | |
EUPHONIC_VERSION: ${{ github.event.inputs.version }} | |
run: python -m tox -c release_tox.ini | |
- name: Upload test results | |
if: always() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: Unit test results ${{ matrix.os }} | |
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@v2 | |
with: | |
path: artifacts | |
- name: Publish test results | |
uses: EnricoMi/publish-unit-test-result-action@v2 | |
with: | |
junit_files: artifacts/**/junit_report*.xml | |