Bump astral-sh/ruff-action from 4.0.0 to 4.1.0 #558
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: PyLECO CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| docs: | |
| name: Documentation | |
| runs-on: "ubuntu-latest" | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pyleco requirements | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: environment.yml | |
| create-args: python=3.10 | |
| cache-environment-key: pylatest-ubuntu-latest-mamba-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} | |
| cache-downloads: false | |
| - name: Python and Mamba version | |
| run: | | |
| python --version | |
| micromamba info | |
| - uses: ammaraskar/sphinx-problem-matcher@v1 | |
| - name: Generate docs | |
| if: always() # run even if the previous step failed | |
| working-directory: ./docs | |
| run: | | |
| echo "::add-matcher::.github/sphinx.json" | |
| make html SPHINXOPTS="-W --keep-going" | |
| - name: Run doctests | |
| if: always() # run even if the previous step failed | |
| working-directory: ./docs | |
| run: | | |
| echo "::add-matcher::.github/sphinx.json" | |
| make doctest SPHINXOPTS="-W --keep-going" | |
| code_style: | |
| name: Static Code Style Checking | |
| runs-on: "ubuntu-latest" | |
| permissions: | |
| contents: read | |
| checks: write | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - uses: actions/setup-python@v6 | |
| with: | |
| python-version: "3.8" | |
| cache: 'pip' | |
| - name: Install pyleco | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install -e .[dev] | |
| - name: Add venv to PATH for pyright | |
| run: echo "$PWD/.venv/bin" >> $GITHUB_PATH | |
| - name: Lint with ruff | |
| uses: astral-sh/ruff-action@v4.1.0 | |
| with: | |
| args: "check --output-format github" | |
| - name: Type check with pyright | |
| if: success() || failure() | |
| uses: jakebailey/pyright-action@v3 | |
| test_coverage: | |
| name: Code Coverage on codecov | |
| runs-on: "ubuntu-latest" | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pyleco requirements | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: environment.yml | |
| cache-environment-key: pylatest-ubuntu-latest-mamba-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} | |
| cache-downloads: false | |
| - name: Python version | |
| run: python --version | |
| - name: Install Pyleco | |
| # If the pytest problem matcher stops working because of bad paths, do an editable install | |
| run: pip install -e .[dev] # editable for covtest | |
| - name: Test for Coverage | |
| run: pytest --cov=pyleco --cov-report=xml | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v7 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| files: ./coverage.xml,!./cache | |
| flags: unittests | |
| name: codecov-umbrella | |
| verbose: true | |
| test: | |
| name: Python ${{ matrix.python-version }}, ${{ matrix.os }} | |
| runs-on: ${{ matrix.os }} | |
| defaults: | |
| run: | |
| shell: bash -l {0} | |
| strategy: | |
| fail-fast: true | |
| matrix: | |
| os: ["ubuntu-latest", "macos-latest", "windows-latest"] | |
| python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v7 | |
| with: | |
| fetch-depth: 0 | |
| - name: Install pyleco requirements | |
| uses: mamba-org/setup-micromamba@v3 | |
| with: | |
| environment-file: environment.yml | |
| create-args: python=${{ matrix.python-version }} | |
| cache-environment-key: py${{ matrix.python-version }}-${{ matrix.os }}-mamba-${{ env.CACHE_NUMBER }}-${{ hashFiles('environment.yml') }} | |
| cache-downloads: false | |
| - name: Python version | |
| run: python --version | |
| - name: Install Pyleco | |
| # If the pytest problem matcher stops working because of bad paths, do an editable install | |
| run: pip install .[dev] | |
| - name: Pyleco version | |
| run: python -c "import pyleco;print(pyleco.__version__)" | |
| - name: Run pytest under Linux with xvfb | |
| if: runner.os == 'Linux' | |
| run: | | |
| echo "::add-matcher::.github/pytest.json" | |
| xvfb-run -a pytest | |
| - name: Run pytest under Windows | |
| if: runner.os == 'Windows' | |
| run: | | |
| echo "::add-matcher::.github/pytest.json" | |
| pytest | |
| - name: Run pytest under Mac without integration tests | |
| if: runner.os == 'macOS' | |
| run: | | |
| echo "::add-matcher::.github/pytest.json" | |
| pytest --ignore=tests/integration_tests |