CI / test-and-build (push) Successful in 11s
Confirmado con dos runs reales: sin importar cuál sea, el último step de la lista nunca se ejecuta ni deja rastro en el log (ni siquiera como omitido) en este runner (act_runner v0.2.13, modo host). Se agrega un paso trivial después de 'Publicar en producción' para que éste deje de ser el último y sí se ejecute.
79 lines
2.2 KiB
YAML
79 lines
2.2 KiB
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
|
|
jobs:
|
|
test-and-build:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 0
|
|
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
|
|
- name: Instalar Zola fijado
|
|
run: |
|
|
mkdir -p "$HOME/.local/bin"
|
|
curl -sL "https://github.com/getzola/zola/releases/download/v0.23.3/zola-v0.23.3-x86_64-unknown-linux-gnu.tar.gz" -o /tmp/zola.tar.gz
|
|
tar xz -C "$HOME/.local/bin" -f /tmp/zola.tar.gz zola
|
|
echo "$HOME/.local/bin" >> "$GITHUB_PATH"
|
|
"$HOME/.local/bin/zola" --version
|
|
|
|
- name: Preparar tema fijado
|
|
run: ./scripts/bootstrap-theme.sh
|
|
|
|
- name: Formato Go
|
|
run: test -z "$(gofmt -l cmd internal)"
|
|
|
|
- name: Pruebas Go
|
|
run: go test ./...
|
|
|
|
- name: Detector de carreras Go
|
|
run: go test -race ./...
|
|
|
|
- name: Análisis estático Go
|
|
run: go vet ./...
|
|
|
|
- name: Compilar CLI
|
|
run: make build
|
|
|
|
- name: Flujo integral de la CLI
|
|
run: ./scripts/e2e-local.sh
|
|
|
|
- name: Verificar firmas SSH de commits del pull request
|
|
if: github.event_name == 'pull_request'
|
|
env:
|
|
BASE_SHA: ${{ github.event.pull_request.base.sha }}
|
|
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
|
|
run: ./scripts/verify-signatures-ci.sh
|
|
|
|
- name: Regenerar y comprobar proyección
|
|
run: |
|
|
./bin/clusterlog --root . sync
|
|
./bin/clusterlog --root . sync --check
|
|
|
|
- name: Validar contenido y plantillas
|
|
run: ./bin/clusterlog --root . validate --require-zola
|
|
|
|
- name: Construir sitio
|
|
run: zola build
|
|
|
|
- name: Depurar contexto de despliegue
|
|
run: echo "ref=${{ github.ref }} event=${{ github.event_name }} ref_name=${{ github.ref_name }}"
|
|
|
|
- name: Publicar en producción (clusterlog.mcps-epcm.org)
|
|
if: ${{ github.ref == 'refs/heads/main' && github.event_name == 'push' }}
|
|
run: rsync -a --delete public/ /opt/clusterlog/public/
|
|
|
|
- name: Fin del pipeline
|
|
run: echo "listo"
|