docs: enhance EvoBGP architecture plan with new risk mitigation strategies, testing matrix for BIRD2, and CI/CD workflow details. Updated section titles for clarity and added completed todos for deployment practices.
This commit is contained in:
@@ -0,0 +1,10 @@
|
||||
# Gitea Actions
|
||||
|
||||
В репозитории включён workflow [workflows/ci.yaml](workflows/ci.yaml).
|
||||
|
||||
Требования к runner:
|
||||
|
||||
- Метка `ubuntu-latest` (или измените `runs-on` под свои labels).
|
||||
- Для job `bird2` на runner должен быть доступен **Docker** (проверка `bird -c … -p` в контейнере `debian:bookworm-slim` с пакетом `bird2`).
|
||||
|
||||
Секреты не обязательны для базового CI; для публикации образов добавьте свои шаги и credentials в отдельный workflow.
|
||||
@@ -0,0 +1,56 @@
|
||||
name: CI
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main, master]
|
||||
pull_request:
|
||||
branches: [main, master]
|
||||
|
||||
jobs:
|
||||
openapi:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: "20"
|
||||
- name: Lint OpenAPI (Redocly)
|
||||
run: npx --yes @redocly/cli@1 lint docs/openapi.yaml
|
||||
|
||||
go:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: actions/setup-go@v5
|
||||
with:
|
||||
go-version: "1.22"
|
||||
- name: Vet
|
||||
run: go vet ./...
|
||||
- name: Test
|
||||
run: go test ./... -race -count=1
|
||||
- name: Build all commands
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
out="${RUNNER_TEMP}/evobgp-bin"
|
||||
mkdir -p "$out"
|
||||
for d in cmd/*/; do
|
||||
name="$(basename "$d")"
|
||||
go build -o "$out/$name" "./$d"
|
||||
done
|
||||
|
||||
bird2:
|
||||
runs-on: ubuntu-latest
|
||||
needs: [go]
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- name: bird -p on all scenario bird.conf files
|
||||
run: |
|
||||
set -euxo pipefail
|
||||
for conf in internal/birdfmt/testdata/scenarios/*/bird.conf; do
|
||||
echo "==> $conf"
|
||||
docker run --rm \
|
||||
-e "BIRD_CONF=/work/${conf}" \
|
||||
-v "$PWD:/work:ro" \
|
||||
debian:bookworm-slim \
|
||||
bash -ceu 'apt-get update -qq && DEBIAN_FRONTEND=noninteractive apt-get install -y -qq bird2 >/dev/null && bird -c "$BIRD_CONF" -p'
|
||||
done
|
||||
Reference in New Issue
Block a user