Files
shanhe-puzzle/.gitea/workflows/verify.yml
T
codex-bot 19a92f950c
Shanhe source and offline package checks / verify (pull_request) Has been cancelled
fix(ci): fetch history for source patch validation
2026-11-01 17:33:24 +08:00

29 lines
956 B
YAML

name: Shanhe source and offline package checks
on:
pull_request:
branches: [main]
push:
branches: [main]
concurrency:
group: shanhe-${{ gitea.event.pull_request.number || gitea.ref }}
cancel-in-progress: true
jobs:
verify:
runs-on: ces-control
timeout-minutes: 60
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Check patch formatting
run: git diff --check HEAD^ HEAD
- name: Build isolated verification image
run: docker build -f Dockerfile.ci -t "shanhe-check:${{ gitea.sha }}" .
- name: Verify unit tests and offline package
run: docker run --rm "shanhe-check:${{ gitea.sha }}"
- name: Remove this verification image while retaining parent cache
if: always()
run: |
image="shanhe-check:${{ gitea.sha }}"
if docker image inspect "$image" >/dev/null 2>&1; then docker image rm --no-prune "$image"; fi