Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 1 addition & 4 deletions .github/workflows/ci-github-actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,11 +14,8 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: go-version
# Reference: https://github.com/actions/setup-go/issues/23
run: echo "::set-output name=version::$(cat ./.go-version)"
- uses: actions/setup-go@v3
with:
go-version: ${{ steps.go-version.outputs.version }}
go-version-file: 'go.mod'
- run: go install github.com/rhysd/actionlint/cmd/actionlint@latest
- run: actionlint
22 changes: 2 additions & 20 deletions .github/workflows/ci-go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,26 +21,8 @@ jobs:
with:
go-version-file: 'go.mod'
- run: go mod download
- uses: golangci/golangci-lint-action@v3.2.0
with:
skip-go-installation: true
terraform-provider-corner:
defaults:
run:
working-directory: terraform-provider-corner
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v3
with:
path: terraform-provider-corner
repository: hashicorp/terraform-provider-corner
- uses: actions/setup-go@v3
with:
go-version-file: 'go.mod'
- run: go mod edit -replace=github.com/hashicorp/terraform-plugin-framework-validators=../
- run: go mod tidy
- run: go test -v ./internal/frameworkprovider
- uses: golangci/golangci-lint-action@v3

test:
name: test (Go v${{ matrix.go-version }})
runs-on: ubuntu-latest
Expand Down
5 changes: 1 addition & 4 deletions .github/workflows/ci-goreleaser.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,12 +14,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- id: go-version
# Reference: https://github.com/actions/setup-go/issues/23
run: echo "::set-output name=version::$(cat ./.go-version)"
- uses: actions/setup-go@v3
with:
go-version: ${{ steps.go-version.outputs.version }}
go-version-file: 'go.mod'
- uses: goreleaser/goreleaser-action@v3
with:
args: check
8 changes: 1 addition & 7 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,15 +16,9 @@ jobs:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
with:
# Required for release notes
fetch-depth: 0
- id: go-version
# Reference: https://github.com/actions/setup-go/issues/23
run: echo "::set-output name=version::$(cat ./.go-version)"
- uses: actions/setup-go@v3
with:
go-version: ${{ steps.go-version.outputs.version }}
go-version-file: 'go.mod'
- name: Generate Release Notes
# Fetch CHANGELOG.md contents up to Git tag prior to this release, skipping top two lines
run: sed -n -e "1{/# /d;}" -e "2{/^$/d;}" -e "/# $(git describe --abbrev=0 --exclude="$(git describe --abbrev=0 --match='v*.*.*' --tags)" --match='v*.*.*' --tags | tr -d v)/q;p" CHANGELOG.md > /tmp/release-notes.txt
Expand Down
15 changes: 15 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,15 @@
default: build

build:
go build -v ./...

lint:
golangci-lint run

fmt:
gofmt -s -w -e .

test:
go test -v -cover -timeout=120s -parallel=4 ./...

.PHONY: build lint fmt test