Files
clusterlogs/.gitea/workflows/ci.yml
T
fernando 57f347a259
CI / test-and-build (push) Failing after 24s
ci: instalar Zola directo, sin taiki-e/install-action
install-action falla en el runner de Gitea Actions en modo host: reporta
runner.os='linux' (minúsculas) y la acción sólo reconoce 'Linux'. Se
reemplaza por una descarga directa del tarball de la release fijada.
2026-08-18 00:31:35 -06:00

73 lines
1.9 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: 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/