mirror of
https://github.com/terraform-docs/terraform-docs.git
synced 2026-03-27 12:58:35 +07:00
* Migrate to github.com/terraform-docs org * remove codecov token * update maintenance notice in README
99 lines
2.2 KiB
YAML
99 lines
2.2 KiB
YAML
name: validate
|
|
|
|
on:
|
|
push:
|
|
branches:
|
|
- master
|
|
pull_request:
|
|
|
|
jobs:
|
|
verify:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
steps:
|
|
- name: Set up Go 1.14.x
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14.x
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Verify 'vendor' dependencies
|
|
run: make verify
|
|
|
|
checkfmt:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
steps:
|
|
- name: Set up Go 1.14.x
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14.x
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Check formatting of go files
|
|
run: |
|
|
export PATH=$PATH:$(go env GOPATH)/bin
|
|
make goimports checkfmt
|
|
|
|
lint:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
steps:
|
|
- name: Set up Go 1.14.x
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14.x
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Run linters
|
|
run: |
|
|
export PATH=$PATH:$(go env GOPATH)/bin
|
|
make golangci lint
|
|
|
|
staticcheck:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
steps:
|
|
- name: Set up Go 1.14.x
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14.x
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Run staticcheck
|
|
run: make staticcheck
|
|
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
if: "!contains(github.event.head_commit.message, '[ci skip]')"
|
|
steps:
|
|
- name: Set up Go 1.14.x
|
|
uses: actions/setup-go@v1
|
|
with:
|
|
go-version: 1.14.x
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v1
|
|
|
|
- name: Run tests
|
|
run: make test
|
|
|
|
- name: Upload coverage to Codecov
|
|
uses: codecov/codecov-action@v1
|
|
if: always()
|
|
with:
|
|
file: ./coverage.out
|