Skip to content

Merge pull request #41 from guardian/dependabot/go_modules/github.com… #168

Merge pull request #41 from guardian/dependabot/go_modules/github.com…

Merge pull request #41 from guardian/dependabot/go_modules/github.com… #168

Workflow file for this run

name: test
on:
push:
branches:
- main
pull_request:
branches: [main]
jobs:
test:
timeout-minutes: 30
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@1af3b93b6815bc44a9784bd300feb67ff0d1eeb3 # v6.0.0
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@4dc6199c7b1a012772edbd06daecab0f50c9053c # v6.1.0
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@25e2cdc5eb1d7a04fdc45ff538f1a00e960ae128 # v8.0.0
with:
version: v2.1.6
args: --timeout=10m
- name: Get dependencies
run: go get -t -d ./...
- name: Build
run: go build .
- name: Test
run: make test
- name: Setup Cloudquery CLI
uses: cloudquery/setup-cloudquery@b28d6a2ee899e112b667285cce4fe9cb9b7129a3 # v4.1.8
with:
version: 'v6.20.5'
- name: Generate docs
if: github.event_name == 'pull_request'
run: make gen-docs
- name: Fail if generation updated files
if: github.event_name == 'pull_request'
run: test "$(git status -s | wc -l)" -eq 0 || (git status -s; echo "Generated docs are out of date. Run 'make gen-docs' and commit again" && exit 1)