Skip to content

setup CI/CD pipeline and enhance package metadata #9

setup CI/CD pipeline and enhance package metadata

setup CI/CD pipeline and enhance package metadata #9

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: 73, Col: 18): Unrecognized function: 'replace'. Located at position 1 within expression: replace(matrix.python-version, '.', '')
on:
push:
branches: [main, devel]
pull_request:
branches: [main, devel]
permissions:
contents: read
jobs:
lint:
name: Lint with pre-commit
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install tox
run: uv pip install --system tox tox-uv
- name: Run pre-commit via tox
run: tox run -e lint
pkg:
name: Validate Package Metadata
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install tox
run: uv pip install --system tox tox-uv
- name: Build and check package
run: tox run -e pkg
test:
name: Test with tox (Python ${{ matrix.python-version }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
steps:
- uses: actions/checkout@v4
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install uv
uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- name: Install tox
run: uv pip install --system tox tox-uv
- name: Run tox
run: tox run -e py$(echo ${{ matrix.python-version }} | tr -d .)
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v5
with:
files: .tox/coverage.py${{ replace(matrix.python-version, '.', '') }}.xml
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}