fix: Windows OpenMP duplicate issue + tutorials torch.hub
rate limit issues (monkeypatch)
#81
Workflow file for this run
This file contains hidden or 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: CI | |
on: | |
push: | |
branches: [develop, release] | |
pull_request: | |
branches: [develop, release] | |
env: | |
GITHUB_TOKEN: ${{ secrets.GH_TOKEN_TORCHHUB }} | |
QSDGHHGF: ${{ secrets.CODECOV_TOKEN }} | |
jobs: | |
build: | |
name: continuous-integration | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
python-version: ["3.12", "3.13"] | |
os: ["ubuntu-latest", "windows-latest", "macos-latest"] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Install the latest version of uv and set the python version | |
uses: astral-sh/setup-uv@v6 | |
with: | |
version: "0.8.9" | |
python-version: ${{ matrix.python-version }} | |
- name: Run ruff | |
run: | | |
uvx -v ruff check | |
uvx -v ruff format --diff | |
- name: Run mypy | |
run: | | |
uv run python -c "import os; print(repr(os.getenv('QSDGHHGF')[-5:]))" | |
uv -v run mypy | |
- name: Build docs (Posix) | |
if: matrix.os != 'windows-latest' && matrix.os != 'macos-latest' # Temporary (github.com/ThalesGroup/scio/issues/2) | |
env: | |
SPHINXOPTS: --fail-on-warning | |
run: | | |
uv -v run make -C docs | |
- name: Build docs (Windows) | |
if: matrix.os == 'windows-latest' | |
env: | |
SPHINXOPTS: --fail-on-warning | |
run: | | |
uv -v run cmd /c "docs\\make.bat" | |
- name: Build & Install | |
run: | | |
uv -v build | |
uv -v pip install dist/scio_pypi-1.0.0rc3-py3-none-any.whl | |
- name: Run pytest | |
if: matrix.os != 'macos-latest' # Temporary (github.com/ThalesGroup/scio/issues/2) | |
id: run-pytest | |
continue-on-error: true | |
run: | | |
uv -v run pytest -vv --cov-report=xml | |
- name: Upload observed plots on failure | |
if: ${{ steps.run-pytest.outcome == 'failure' }} | |
uses: actions/upload-artifact@v4 | |
with: | |
name: pytest-observed-${{ matrix.os }}-py${{ matrix.python-version }} | |
path: test/expected/*/*.observed.* | |
retention-days: 7 | |
- name: Fail the job if pytest failed | |
if: ${{ steps.run-pytest.outcome == 'failure' }} | |
run: exit 1 | |
- name: Upload coverage report to Codecov (Ubuntu, python3.13) | |
if: matrix.os == 'ubuntu-latest' && matrix.python-version == '3.13' | |
uses: codecov/codecov-action@v5 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} | |
verbose: true | |
# TEMPORARILY DISABLED (https://github.com/ThalesGroup/scio/issues/9) | |
# - name: Run pytest with lowest resolution | |
# if: matrix.os != 'macos-latest' # Temporary (github.com/ThalesGroup/scio/issues/2) | |
# id: run-pytest-lowest | |
# continue-on-error: true | |
# run: | | |
# uv -v run --refresh --resolution=lowest pytest -vv | |
# - name: Upload observed plots on lowest failure | |
# if: ${{ steps.run-pytest-lowest.outcome == 'failure' }} | |
# uses: actions/upload-artifact@v4 | |
# with: | |
# name: pytest-lowest-observed-${{ matrix.os }}-py${{ matrix.python-version }} | |
# path: test/expected/*/*.observed.* | |
# retention-days: 7 | |
# - name: Fail the job if pytest lowest failed | |
# if: ${{ steps.run-pytest-lowest.outcome == 'failure' }} | |
# run: exit 1 |