Files
ayatori/.gitea/workflows/verify.yml
T
panxiao81 505aeb8e50
Verify / database-integration (pull_request) Failing after 58s
Verify / test (pull_request) Successful in 11m30s
Verify / lint (pull_request) Successful in 13m59s
fix: 在 Pod CI 初始化 Docker 并保留 fixture 诊断
2026-09-21 15:48:06 +00:00

88 lines
2.2 KiB
YAML
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
name: Verify
on:
pull_request:
push:
branches: [main]
jobs:
test:
runs-on: [self-hosted, pod]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
go-version-file: go.mod
cache: true
- name: Verify generated files and tests
run: |
make test
git diff --exit-code
lint:
runs-on: [self-hosted, pod]
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
go-version-file: go.mod
cache: true
- name: Lint
run: |
make lint
make lint-database-integration
database-integration:
runs-on: [self-hosted, pod]
timeout-minutes: 30
env:
DOCKER_HOST: unix:///var/run/docker.sock
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd
with:
persist-credentials: false
- name: Set up Go
uses: actions/setup-go@4b73464bb391d4059bd26b0524d20df3927bd417
with:
go-version-file: go.mod
cache: true
# 复用 dynamic runner 的 pod-smokedaemon 与数据只属于本次 Pod job。
- name: Start job-local Docker
shell: bash
run: |
set -euo pipefail
command -v docker
command -v dockerd
findmnt /var/lib/docker
sudo -n nohup dockerd \
--host=unix:///var/run/docker.sock \
--storage-driver=overlay2 \
>/tmp/ayatori-dockerd.log 2>&1 &
for _ in {1..60}; do
if docker info >/dev/null 2>&1; then
docker version
exit 0
fi
sleep 1
done
cat /tmp/ayatori-dockerd.log
exit 1
- name: Test Database integration with real backends
run: make test-database-integration