|
| 1 | +name: Test MSS |
| 2 | + |
| 3 | +on: |
| 4 | + push: |
| 5 | + branches: |
| 6 | + - develop |
| 7 | + - stable |
| 8 | + - 'GSOC**' |
| 9 | + pull_request: |
| 10 | + branches: |
| 11 | + - develop |
| 12 | + - stable |
| 13 | + - 'GSOC**' |
| 14 | + |
| 15 | +jobs: |
| 16 | + test: |
| 17 | + runs-on: ${{ matrix.os }} |
| 18 | + strategy: |
| 19 | + fail-fast: false |
| 20 | + matrix: |
| 21 | + os: ["macos-13", "macos-14", "ubuntu-latest"] |
| 22 | + steps: |
| 23 | + - uses: actions/checkout@v4 |
| 24 | + - name: Build requirements.txt file |
| 25 | + run: | |
| 26 | + sed -n '/^requirements:/,/^test:/p' localbuild/meta.yaml | |
| 27 | + sed -e "s/.*- //" | |
| 28 | + sed -e "s/menuinst.*//" | |
| 29 | + sed -e "s/.*://" > requirements.tmp.txt |
| 30 | + cat requirements.d/development.txt >> requirements.tmp.txt |
| 31 | + echo "pytest-randomly" >> requirements.tmp.txt |
| 32 | + sed -e '/^$/d' -e '/^#.*$/d' requirements.tmp.txt > requirements.txt |
| 33 | + rm requirements.tmp.txt |
| 34 | + cat requirements.txt |
| 35 | + - name: Get current year and calendar week |
| 36 | + id: year-and-week |
| 37 | + run: echo "year-and-week=$(date +%Y-%V)" >> "$GITHUB_OUTPUT" |
| 38 | + - uses: mamba-org/setup-micromamba@v1 |
| 39 | + with: |
| 40 | + environment-file: requirements.txt |
| 41 | + environment-name: ci |
| 42 | + cache-environment: true |
| 43 | + # Set the cache key in a way that the cache is invalidated every week on monday |
| 44 | + cache-environment-key: environment-${{ steps.year-and-week.outputs.year-and-week }} |
| 45 | + - name: Run tests |
| 46 | + timeout-minutes: 20 |
| 47 | + # The ignored files can somehow cause the test suite to timeout. |
| 48 | + # I have no idea yet on why this happens and how to fix it. |
| 49 | + # Even a module level skip is not enough, they need to be completely ignored. |
| 50 | + # TODO: fix those tests and drop the ignores |
| 51 | + run: micromamba run -n ci env QT_QPA_PLATFORM=offscreen pytest -v -n logical --durations=20 --cov=mslib |
| 52 | + --ignore=tests/_test_msui/test_sideview.py --ignore=tests/_test_msui/test_topview.py --ignore=tests/_test_msui/test_wms_control.py |
| 53 | + tests |
0 commit comments