mirror of
https://github.com/parkan/go-hauk.git
synced 2026-06-22 19:27:46 +02:00
37 lines
844 B
YAML
37 lines
844 B
YAML
name: ci
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
permissions:
|
|
contents: read
|
|
jobs:
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
services:
|
|
redis:
|
|
image: redis:alpine
|
|
ports:
|
|
- 6379:6379
|
|
env:
|
|
TEST_REDIS_ADDR: localhost:6379
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: actions/setup-go@v5
|
|
with:
|
|
go-version-file: go.mod
|
|
cache: true
|
|
- run: go build ./...
|
|
- run: go vet ./...
|
|
- run: go test ./...
|
|
vuln:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- uses: golang/govulncheck-action@v1
|
|
with:
|
|
go-version-file: go.mod
|
|
# reuse the checkout above; the action's own bundled checkout
|
|
# conflicts with checkout v6 (duplicate Authorization header)
|
|
repo-checkout: false
|