Skip to content

[MIX] CI timeout + RTD for uv + dissemination contribs #95

[MIX] CI timeout + RTD for uv + dissemination contribs

[MIX] CI timeout + RTD for uv + dissemination contribs #95

Workflow file for this run

name: CI

Check failure on line 1 in .github/workflows/ci.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/ci.yml

Invalid workflow file

(Line: 9, Col: 1): Unexpected value 'env-spec', (Line: 16, Col: 1): Unexpected value 'setup-steps', (Line: 27, Col: 20): Unexpected value '15', (Line: 31, Col: 5): Unexpected value '<<', (Line: 16, Col: 14): A sequence was not expected, (Line: 30, Col: 5): Required property is missing: runs-on, (Line: 41, Col: 5): Unexpected value '<<', (Line: 16, Col: 14): A sequence was not expected, (Line: 40, Col: 5): Required property is missing: runs-on
on:
push:
branches: [develop, release]
pull_request:
branches: [develop, release]
env-spec: &env-spec
strategy:
matrix:
os: ["ubuntu-latest", "windows-latest"] # Remove MacOS (billing + github.com/ThalesGroup/scio/issues/2)
python-version: ["3.12", "3.13"]
runs-on: ${{ matrix.os }}
setup-steps: &setup-steps
- name: Checkout
uses: actions/checkout@v4
- name: Install uv and set python version
uses: astral-sh/setup-uv@v6
with:
version: "0.8.17"
python-version: ${{ matrix.python-version }}
# ==================================== JOBS ====================================
jobs:
timeout-minutes: 15
lint:
name: Lint checks
<<: *env-spec
steps:
- *setup-steps
- name: Run ruff
run: |
uvx -v ruff check
uvx -v ruff format --diff
other:
needs: [lint]
<<: *env-spec
steps:
- *setup-steps
- name: Run mypy
run: |
uv -v run mypy
- name: Build & Install
run: |
uv -v build
uv -v pip install dist/scio_pypi-1.0.0rc3-py3-none-any.whl
- name: Build docs (Posix)
if: matrix.os != 'windows-latest'
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: Run pytest
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: 30
- name: Fail the job if pytest failed
if: ${{ steps.run-pytest.outcome == 'failure' }}
run: exit 1
- name: Upload coverage report to Codecov
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
# 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