Files
dd0c/.gitea/workflows/ci-p2-drift.yml
Max Mayfield 1bafad5a86
All checks were successful
CI — P2 Drift (Go + Node) / agent (push) Successful in 1m42s
CI — P2 Drift (Go + Node) / saas (push) Successful in 56s
CI: add go mod tidy to Go agent workflow to fix missing go.sum
2026-03-01 07:03:51 +00:00

51 lines
1.6 KiB
YAML

name: CI — P2 Drift (Go + Node)
on:
push:
branches: [main]
paths: ['products/02-iac-drift-detection/**']
pull_request:
paths: ['products/02-iac-drift-detection/**']
jobs:
agent:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Install Go
run: |
if ! command -v go &>/dev/null; then
curl -sL https://go.dev/dl/go1.22.12.linux-amd64.tar.gz | tar -C /usr/local -xzf - 2>/dev/null || \
curl -sL https://go.dev/dl/go1.22.12.linux-amd64.tar.gz | sudo tar -C /usr/local -xzf -
export PATH="/usr/local/go/bin:$PATH"
fi
go version
- name: Test agent
run: |
export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/agent && go mod tidy && go test ./...
- name: Vet
run: |
export PATH="/usr/local/go/bin:$HOME/go/bin:$PATH"
cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/agent && go vet ./...
saas:
runs-on: ubuntu-latest
steps:
- name: Checkout
run: |
git clone --depth=1 http://192.168.86.11:3005/jarvis/dd0c.git $GITHUB_WORKSPACE || true
- name: Install deps
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/saas && npm ci --include=dev
- name: Type check
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/saas && ./node_modules/.bin/tsc --noEmit
- name: Test
run: cd $GITHUB_WORKSPACE/products/02-iac-drift-detection/saas && npm test