Skip to content

Merge pull request #82 from guardian/dependabot/github_actions/action… #284

Merge pull request #82 from guardian/dependabot/github_actions/action…

Merge pull request #82 from guardian/dependabot/github_actions/action… #284

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@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with:
fetch-depth: 2
- name: Set up Go 1.x
uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
with:
go-version-file: go.mod
- name: golangci-lint
uses: golangci/golangci-lint-action@ba0d7d2ec06a0ea1cb5fa41b2e4a3ab91d21278a # v9.3.0
with:
version: v2.11.4
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@757b19eb8496cf9e89a78de54f2c677253f54f6b # v5.0.3
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)