Norrisizer/.forgejo/workflows/ci.yml
2026-07-26 19:25:31 +09:00

21 lines
633 B
YAML

name: CI
on:
push:
pull_request:
jobs:
check:
runs-on: docker
container:
image: python:3.12-slim
steps:
- name: Checkout
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
command -v git >/dev/null || (apt-get update -qq && apt-get install -y -qq git)
AUTH_URL=$(echo "$GITHUB_SERVER_URL" | sed -E "s#^(https?)://#\1://x-access-token:${GITHUB_TOKEN}@#")
git clone --depth 1 --branch "$GITHUB_REF_NAME" "$AUTH_URL/${GITHUB_REPOSITORY}.git" .
- run: pip install --no-cache-dir -r requirements.txt
- run: python -m py_compile app.py