Skip to content

Bump pypa/gh-action-pypi-publish to v1.14.3 (GHSA-5xjx-3w67-w9x9) (#102) #66

Bump pypa/gh-action-pypi-publish to v1.14.3 (GHSA-5xjx-3w67-w9x9) (#102)

Bump pypa/gh-action-pypi-publish to v1.14.3 (GHSA-5xjx-3w67-w9x9) (#102) #66

Workflow file for this run

name: CI
on:
pull_request:
branches: [develop, main]
push:
branches: [develop, main]
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
meta:
name: Resolve versions
runs-on: ubuntu-latest
outputs:
sdk: ${{ steps.meta.outputs.sdk }}
ruff: ${{ steps.pyproject.outputs.ruff }}
steps:
- uses: actions/checkout@v5
- name: Read pyproject.toml
id: pyproject
run: |
python3 - <<'PY' >> "$GITHUB_OUTPUT"
import tomllib
project = tomllib.load(open("pyproject.toml", "rb"))["project"]
print(f"version={project['version']}")
print("ruff=" + next(s for s in project["optional-dependencies"]["dev"] if s.startswith("ruff")))
PY
- id: meta
uses: cubert-hyperspectral/cuvis.docker/.github/actions/release-meta@main
with:
version: ${{ steps.pyproject.outputs.version }}
lint:
name: Lint
needs: meta
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
- uses: actions/setup-python@v6
with:
python-version: '3.11'
- name: Install ruff
run: python -m pip install "${{ needs.meta.outputs.ruff }}"
- name: Check formatting
run: ruff format --check --diff .
- name: Check lint rules
run: ruff check --output-format github .
changelog:
name: Changelog
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v5
with:
fetch-depth: 0
- uses: cubert-hyperspectral/cuvis.docker/.github/actions/changelog@main
- name: Require a changelog entry
if: >
github.event_name == 'pull_request'
&& !contains(github.event.pull_request.labels.*.name, 'no-changelog')
run: |
if ! git diff --name-only "origin/${{ github.base_ref }}...HEAD" | grep -qx CHANGELOG.md; then
echo "This pull request does not touch CHANGELOG.md."
echo "Add an entry under '## [Unreleased]' following CONTRIBUTING.md,"
echo "or label the pull request 'no-changelog' if the change is genuinely invisible to users."
exit 1
fi
tests:
name: Tests
needs: meta
runs-on: ubuntu-latest
container:
image: cubertgmbh/cuvis_pyil:${{ needs.meta.outputs.sdk }}-ubuntu24.04
steps:
- uses: actions/checkout@v5
- name: Install the wrapper with test dependencies
run: python3 -m pip install -e ".[test]"
- name: Run tests
run: python3 -m pytest