Files
keywarden/.gitea/workflows/pr-test.yml
Patrick Asmus (scriptos) 1083b54fb9
Some checks failed
PR Tests / Lint, Build & Test (pull_request) Failing after 4m29s
Security Scan / Go Vulnerability Check (pull_request) Failing after 13s
fix: add nodejs to alpine container for actions/checkout
2026-04-05 18:07:56 +02:00

40 lines
938 B
YAML

# Keywarden CI - Pull Request Tests
# Runs on every PR to master: vet, build, test (with CGO for SQLite)
name: PR Tests
on:
pull_request:
branches: [master]
jobs:
test:
name: Lint, Build & Test
runs-on: ubuntu-latest
container:
image: golang:1.26-alpine
steps:
- name: Install build dependencies
run: apk add --no-cache gcc musl-dev sqlite-dev git nodejs
- name: Checkout code
uses: actions/checkout@v4
- name: Go module cache
uses: actions/cache@v4
with:
path: /go/pkg/mod
key: go-mod-${{ hashFiles('go.sum') }}
- name: Download dependencies
run: go mod download
- name: Go vet
run: go vet ./...
- name: Build
run: CGO_ENABLED=1 go build -o /dev/null ./cmd/keywarden/
- name: Run tests
run: CGO_ENABLED=1 go test -tags integration ./internal/... -v -count=1 -timeout 120s