Reduce log spam #267
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 on Windows | |
on: | |
push: | |
workflow_dispatch: | |
# workflow_run: | |
# workflows: [ CI ] | |
# types: [ completed ] | |
env: | |
PRIMARY_PYTHON_VERSION: '3.12' | |
jobs: | |
test: | |
runs-on: windows-latest | |
# if: ${{ github.event.workflow_run.conclusion == 'success' }} | |
timeout-minutes: 25 | |
steps: | |
- name: Setup Python | |
uses: actions/setup-python@v5 | |
# Windows minutes cost 2x what Linux does, so testing multiple Python versions would be quite costly | |
with: | |
python-version: ${{ env.PRIMARY_PYTHON_VERSION }} | |
- name: Print Python version | |
run: python -V | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Load pip cache | |
uses: actions/cache@v4 | |
with: | |
path: .pip | |
key: pip-${{ runner.os }}-${{ hashFiles('requirements.txt') }} | |
restore-keys: | | |
pip-${{ runner.os }}- | |
pip- | |
- name: Install requirements | |
# Todo: fix NumbaLSODA installation on Windows | |
# Currently the requirements are specified manually to skip NumbaLSODA | |
run: | | |
pip --cache-dir=.pip install --upgrade pip | |
pip --cache-dir=.pip install --upgrade wheel | |
pip --cache-dir=.pip install -r requirements.txt -r requirements-dev.txt | |
- name: Print Numba sysinfo | |
run: python -m numba --sysinfo | tee numba-sysinfo.txt | |
- name: Generate reference data | |
run: python3 pttools/bubble/fluid_reference.py | |
env: | |
PYTHONPATH: . | |
- name: Run tests | |
# Failures may not get processed properly, as pipefail is not supported on Windows. | |
# set -o pipefail | |
run: | | |
pytest | tee test-output.txt | |
coverage json | |
- name: Upload results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: Test results with Numba | |
path: | | |
coverage.xml | |
coverage.json | |
htmlcov | |
numba-sysinfo.txt | |
test-output.txt | |
test-results | |
if-no-files-found: error |