mirror of
https://github.com/sstent/go-garth.git
synced 2026-01-26 09:03:00 +00:00
88 lines
1.8 KiB
YAML
88 lines
1.8 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
tags:
|
|
- "**"
|
|
pull_request: {}
|
|
|
|
env:
|
|
COLUMNS: 150
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
checks: write
|
|
statuses: write
|
|
|
|
jobs:
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
name: lint ${{ matrix.python-version }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- uses: astral-sh/setup-uv@v6
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install --system -e .
|
|
uv pip install --system --group linting
|
|
|
|
- uses: pre-commit/action@v3.0.1
|
|
with:
|
|
extra_args: --all-files --verbose
|
|
env:
|
|
SKIP: no-commit-to-branch
|
|
|
|
test:
|
|
name: test ${{ matrix.python-version }}
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
os: [ubuntu, macos, windows]
|
|
python-version: ["3.10", "3.11", "3.12", "3.13"]
|
|
|
|
env:
|
|
PYTHON: ${{ matrix.python-version }}
|
|
OS: ${{ matrix.os }}
|
|
|
|
runs-on: ${{ matrix.os }}-latest
|
|
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
|
|
- uses: actions/setup-python@v5
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
|
|
- uses: astral-sh/setup-uv@v6
|
|
|
|
- name: Install dependencies
|
|
run: |
|
|
uv pip install --system -e .
|
|
uv pip install --system --group testing
|
|
|
|
- name: test
|
|
run: make testcov
|
|
env:
|
|
CONTEXT: ${{ runner.os }}-py${{ matrix.python-version }}-with-deps
|
|
|
|
- name: upload coverage to Codecov
|
|
uses: codecov/codecov-action@v5
|
|
with:
|
|
files: ./coverage/coverage.xml
|
|
flags: unittests
|
|
name: codecov-umbrella
|
|
fail_ci_if_error: true
|