Skip to content

lint fix

lint fix #477

Workflow file for this run

name: Lint & Test Code
on:
push:
branches:
- "**"
- "!main"
- "!master"
env:
go_version: 1.22
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
lint-test-code:
name: Lint & Test Code
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Setup Go
uses: actions/[email protected]
with:
go-version: "${{ env.go_version }}"
- name: Setup Golang caches
uses: actions/[email protected]
with:
path: |
~/.cache/go-build
~/go/pkg/mod
key: ${{ runner.os }}-golang-${{ hashFiles('**/go.sum') }}
restore-keys: |
${{ runner.os }}-golang-
- name: Setup Just
uses: extractions/setup-just@v2
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Run Code Linting Test
run: just lint
- name: Check package files up to date
run: |
just tidy
git diff --exit-code -- go.* pkg/config-api-client/go.*
- name: Run Tests
run: |
just test
just coverage
- name: Check Provider docs up to date
run: |
just generate-provider-docs
git add --all docs
git diff --cached --exit-code -- docs || exit 1
- name: Check Provider docs valid
run: just validate-provider-docs
- name: Upload Code Coverage Report
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./pkg/config-api-client/.coverage,.coverage
flage: client,provider
fail_ci_if_error: true
- name: Setup Terraform
uses: hashicorp/setup-terraform@v1
with:
terraform_version: 0.13.7
- name: Terraform Formatting Check
run: terraform fmt -recursive -check