Files

49 lines
1.1 KiB
YAML

name: ci
on:
push:
branches: [main]
tags-ignore: ['**']
workflow_dispatch:
schedule:
- cron: '17 6 * * *'
env:
GOPRIVATE: repo.anhonesthost.net
GOFLAGS: -buildvcs=false
jobs:
ci:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version-file: go.mod
cache: false
- name: Build
run: go build ./...
- name: Vet
run: go vet ./...
- name: Unit tests (no controller required)
run: make test
- name: Build release binary (linux/amd64)
run: |
CGO_ENABLED=0 go build -trimpath -o "$RUNNER_TEMP/terraform-provider-threshold" .
test -x "$RUNNER_TEMP/terraform-provider-threshold"
- name: govulncheck
run: |
go install golang.org/x/vuln/cmd/govulncheck@v1.9.0
"$(go env GOPATH)/bin/govulncheck" ./...
- name: osv-scanner
run: |
go install github.com/google/osv-scanner/v2/cmd/osv-scanner@v2.7.0
"$(go env GOPATH)/bin/osv-scanner" scan source -r .