Periodic Test Run #71
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: Periodic Test Run | |
on: | |
workflow_dispatch: | |
schedule: | |
# * is a special character in YAML so you have to quote this string | |
- cron: "17 14 * * WED" | |
concurrency: | |
group: ${{ github.workflow }} | |
cancel-in-progress: true | |
jobs: | |
linux: | |
# - this is a fork and manually-triggered, or | |
# - this is the main repo, and | |
# - we are on the main (or feature) branch | |
if: >- | |
( | |
github.event.repository.fork | |
&& github.event_name == 'workflow_dispatch' | |
) | |
|| ( | |
!github.event.repository.fork | |
&& ( | |
github.ref_name == 'main' | |
|| startsWith(github.ref_name, 'feature/') | |
) | |
) | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
shell: bash -l {0} | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: ["3.10", "3.11", "3.12"] | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup Miniconda | |
uses: conda-incubator/setup-miniconda@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
channels: conda-canary/label/dev | |
activate-environment: test_env | |
auto-update-conda: true | |
auto-activate-base: false | |
show-channel-urls: true | |
- name: Source Scripts | |
run: | | |
# pip >=22 is required for pip install -e conda-index | |
conda install -c conda-canary/label/dev conda-build "pip>=22" | |
pip install -e .[test] | |
conda info -a | |
pytest | |
analyze: | |
name: Analyze test results | |
needs: [linux] | |
if: always() | |
runs-on: ubuntu-latest | |
steps: | |
- name: Download test results | |
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7 | |
- name: Upload combined test results | |
# provides one downloadable archive of all .coverage/test-report.xml files | |
# of all matrix runs for further analysis. | |
uses: actions/upload-artifact@65462800fd760344b1a7b4382951275a0abb4808 # v4.3.3 | |
with: | |
name: test-results-${{ github.sha }}-all | |
path: test-results-${{ github.sha }}-* | |
retention-days: 90 # default: 90 | |
- name: Test Summary | |
uses: test-summary/action@v2 | |
with: | |
paths: ./test-results-${{ github.sha }}-**/test-report*.xml | |
- name: Decide whether the needed jobs succeeded or failed | |
uses: re-actors/alls-green@release/v1 | |
with: | |
jobs: ${{ toJSON(needs) }} |