Skip to content

Bump actions/upload-artifact from 6 to 7 #910

Bump actions/upload-artifact from 6 to 7

Bump actions/upload-artifact from 6 to 7 #910

Workflow file for this run

name: ci
on:
push:
branches: [main]
tags: ['v*']
pull_request:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: ${{ github.event_name == 'pull_request' }}
env:
FORCE_COLOR: 1
PY_COLORS: 1
UV_LOCKED: 1
UV_NO_SYNC: 1
defaults:
run:
shell: bash
jobs:
check:
if: ${{ !cancelled() }}
name: ${{ matrix.conformance-tests && '(conformance) ' || '' }}${{ matrix.version }} ${{ matrix.platform }} ${{ matrix.backend == 'python' && '(py-backend)' || '' }}
runs-on: ${{ matrix.platform }}
env:
UV_PYTHON: ${{ matrix.version }}
strategy:
fail-fast: false
# https://blog.jaraco.com/efficient-use-of-ci-resources/
matrix:
conformance-tests: [false]
version: ['3.10', '3.14']
platform: [ubuntu-latest, macos-latest, windows-latest]
backend: [cpp]
include:
- version: '3.10'
platform: ubuntu-latest
conformance-tests: true
- version: '3.11'
platform: ubuntu-latest
- version: '3.12'
platform: ubuntu-latest
- version: '3.13'
platform: ubuntu-latest
- version: '3.14'
platform: ubuntu-latest
conformance-tests: true
- version: '3.14'
platform: ubuntu-latest
conformance-tests: true
backend: python
- version: pypy3.10
platform: ubuntu-latest
- version: pypy3.11
platform: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
submodules: true
- name: Windows walkaround for broken symlinks
if: runner.os == 'Windows'
run: |
rm -r pyjelly/_proto
rm -r tests/conformance_tests/rdf
rm -r tests/conformance_tests/grpc
cp -r submodules/protobuf/proto pyjelly/_proto
cp -r submodules/protobuf/test/rdf tests/conformance_tests/rdf
cp -r submodules/protobuf/test/grpc tests/conformance_tests/grpc
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install
id: install
if: ${{ !startsWith(matrix.version, 'pypy') }}
run: uv sync
- name: Install (PyPy)
id: install_pypy
if: ${{ startsWith(matrix.version, 'pypy') }}
env:
HATCH_BUILD_NO_HOOKS: "1"
HATCH_MYPYC_DISABLE: "1"
MYPYC_NO_BUILD: "1"
SKIP_COMPILE: "1"
run: uv sync
- name: Install jelly-cli
uses: jelly-rdf/setup-cli@v1
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') && matrix['conformance-tests'] }}
- name: Select protobuf Python backend
if: ${{ matrix.backend == 'python' }}
run: echo "PROTOCOL_BUFFERS_PYTHON_IMPLEMENTATION=python" >> "$GITHUB_ENV"
- name: Run unit tests
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') && !matrix['conformance-tests'] }}
run: uv run pytest -vv
- name: Run unit tests (with conformance tests and coverage)
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') && matrix['conformance-tests'] }}
run: uv run pytest -vv --cov --cov-branch --cov-report=xml
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') && matrix['conformance-tests'] }}
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: Check formatting
id: formatting
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') }}
run: uv run ruff format . --diff
- name: Lint
id: linting
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') }}
run: uv run ruff check --output-format github
- name: Check type safety
id: types
if: ${{ !cancelled() && (steps.install.conclusion == 'success' || steps.install_pypy.conclusion == 'success') }}
run: uv run mypy .
check-docs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
with:
fetch-depth: 0
submodules: true
persist-credentials: false
- uses: astral-sh/setup-uv@v7
with:
enable-cache: true
- name: Install
id: install
run: uv sync --group docs
- name: Check docs build
run: uv run mkdocs build -s
- name: Check docs for dead links
run: |
uv run mkdocs serve &
sleep 10
uv run linkchecker \
--no-warning \
--check-extern \
--ignore "https://doi.org" \
http://localhost:8000
kill $!
build-wheels:
uses: ./.github/workflows/_build-wheels.yml
with:
cibw_build: "cp314-*"