61 lines
1.4 KiB
YAML
61 lines
1.4 KiB
YAML
|
|
name: CI
|
||
|
|
|
||
|
|
on:
|
||
|
|
push:
|
||
|
|
branches: [main]
|
||
|
|
tags: ['**']
|
||
|
|
pull_request:
|
||
|
|
|
||
|
|
jobs:
|
||
|
|
lint:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
- uses: actions/setup-python@v5
|
||
|
|
with:
|
||
|
|
python-version: '3.11'
|
||
|
|
- name: Install ruff
|
||
|
|
run: pip install ruff
|
||
|
|
- name: Lint
|
||
|
|
run: ruff check .
|
||
|
|
- name: Format check
|
||
|
|
run: ruff format --check .
|
||
|
|
|
||
|
|
test:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
- uses: actions/setup-python@v5
|
||
|
|
with:
|
||
|
|
python-version: '3.11'
|
||
|
|
- name: Install project with dev extras
|
||
|
|
run: pip install -e ".[dev]"
|
||
|
|
- name: Run pytest
|
||
|
|
run: pytest -v
|
||
|
|
|
||
|
|
validate-json:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
- uses: actions/setup-python@v5
|
||
|
|
with:
|
||
|
|
python-version: '3.11'
|
||
|
|
- name: Validate all JSON files
|
||
|
|
run: |
|
||
|
|
set -e
|
||
|
|
for f in $(find . -name '*.json' -not -path './.venv/*' -not -path './node_modules/*'); do
|
||
|
|
echo "Validating $f"
|
||
|
|
python -m json.tool "$f" > /dev/null
|
||
|
|
done
|
||
|
|
|
||
|
|
markdown-links:
|
||
|
|
runs-on: ubuntu-latest
|
||
|
|
steps:
|
||
|
|
- uses: actions/checkout@v4
|
||
|
|
- name: Check markdown links
|
||
|
|
uses: lycheeverse/lychee-action@v2
|
||
|
|
with:
|
||
|
|
args: --verbose --no-progress --max-concurrency 4 './**/*.md'
|
||
|
|
fail: false
|
||
|
|
continue-on-error: true
|