0
0
mirror of https://github.com/bpg/terraform-provider-proxmox.git synced 2025-07-01 19:12:59 +00:00

chore: update ci configs (#148)

* chore: update mergify config

* chore: add linter
This commit is contained in:
Pavel Boldyrev 2022-10-21 21:43:59 -04:00 committed by GitHub
parent 523c244856
commit b0a92de22b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 37 additions and 11 deletions

24
.github/workflows/golangci-lint.yml vendored Normal file
View File

@ -0,0 +1,24 @@
name: golangci-lint
on:
push:
tags:
- v*
branches:
- main
pull_request:
permissions:
contents: read
pull-requests: read
jobs:
golangci:
name: lint
runs-on: ubuntu-latest
steps:
- uses: actions/setup-go@v3
with:
go-version: 1.18
- uses: actions/checkout@v3
- name: golangci-lint
uses: golangci/golangci-lint-action@v3
with:
version: v1.50

View File

@ -21,17 +21,15 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: '1.18'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go mod download
run: go mod download
- name: Build
run: |
go build -v .
run: go vet . && go build -v .
# run acceptance tests in a matrix with Terraform core versions
test:
@ -53,23 +51,19 @@ jobs:
uses: actions/setup-go@v3
with:
go-version: '1.18'
id: go
- name: Check out code into the Go module directory
uses: actions/checkout@v3
- name: Get dependencies
run: |
go mod download
run: go mod download
- name: TF acceptance tests
timeout-minutes: 10
env:
TF_ACC: "1"
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
run: |
go test -v -cover ./...
run: go test -v -cover ./...
all-tests-passed:
name: All Tests Passed

View File

@ -5,3 +5,11 @@ pull_request_rules:
actions:
merge:
method: squash
- name: automatic approval for bpg's pull requests
conditions:
- author=bpg
- label=autoapprove
actions:
review:
type: APPROVE
message: "Auto-approved! :robot:"