Fix testing-all-oses.yml workflow #816
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 MSS | |
on: | |
push: | |
branches: | |
- develop | |
- stable | |
- 'GSOC**' | |
pull_request: | |
branches: | |
- develop | |
- stable | |
- 'GSOC**' | |
jobs: | |
test: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
fail-fast: false | |
matrix: | |
os: ["macos-13", "macos-14", "ubuntu-latest"] | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Build requirements.txt file | |
run: | | |
sed -n '/^requirements:/,/^test:/p' localbuild/meta.yaml | | |
sed -e "s/.*- //" | | |
sed -e "s/menuinst.*//" | | |
sed -e "s/.*://" > requirements.tmp.txt | |
cat requirements.d/development.txt >> requirements.tmp.txt | |
echo "pytest-randomly" >> requirements.tmp.txt | |
sed -e '/^$/d' -e '/^#.*$/d' requirements.tmp.txt > requirements.txt | |
rm requirements.tmp.txt | |
cat requirements.txt | |
- name: Get current year and calendar week | |
id: year-and-week | |
run: echo "year-and-week=$(date +%Y-%V)" >> "$GITHUB_OUTPUT" | |
- uses: mamba-org/setup-micromamba@v1 | |
with: | |
environment-file: requirements.txt | |
environment-name: ci | |
cache-environment: true | |
# Set the cache key in a way that the cache is invalidated every week on monday | |
cache-environment-key: environment-${{ steps.year-and-week.outputs.year-and-week }} | |
# micromamba>=2 breaks CI by hanging indefinitely at the micromamba list step. | |
# See: https://github.com/mamba-org/setup-micromamba/issues/225 | |
# TODO: remove the pinning as soon as the issue is fixed | |
micromamba-version: '1.5.10-0' | |
- name: Run tests | |
timeout-minutes: 40 | |
run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib tests |