furtka/.forgejo/workflows/ci.yml
Daniel Maksymilian Syrnicki ba36bb4741
Some checks failed
Build ISO / build-iso (push) Failing after 5s
CI / lint (push) Successful in 27s
CI / test (push) Successful in 44s
CI / markdown-links (push) Failing after 1s
CI / validate-json (push) Failing after 10m34s
ci: attach build-iso job to DinD network, pin lychee-action source
- build-iso: the job container was on a per-job docker network, so
  `docker-in-docker` (the DinD sidecar hostname on
  `forgejo-runner_default`) didn't resolve. Pin the container to that
  shared network via `container.options: --network forgejo-runner_default`.
  catthehacker/ubuntu:act-latest already has the docker CLI, so drop
  the apt-get step.

- ci.yml markdown-links: forgejo's action mirror at data.forgejo.org
  doesn't carry `lycheeverse/lychee-action`, so `uses:` was 404ing
  before the step could even run (rendering continue-on-error moot).
  Fully-qualified GitHub URL bypasses the mirror.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-14 18:37:54 +02:00

62 lines
1.6 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
# Fully-qualified URL because forgejo's default action mirror
# (data.forgejo.org) doesn't carry lycheeverse/lychee-action.
uses: https://github.com/lycheeverse/lychee-action@v2
with:
args: --verbose --no-progress --max-concurrency 4 './**/*.md'
fail: false
continue-on-error: true