27 lines
917 B
YAML
27 lines
917 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
|
|
- 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
|