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:
parent
523c244856
commit
b0a92de22b
24
.github/workflows/golangci-lint.yml
vendored
Normal file
24
.github/workflows/golangci-lint.yml
vendored
Normal 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
|
16
.github/workflows/test.yml
vendored
16
.github/workflows/test.yml
vendored
@ -21,17 +21,15 @@ jobs:
|
|||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.18'
|
go-version: '1.18'
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
- name: Build
|
- name: Build
|
||||||
run: |
|
run: go vet . && go build -v .
|
||||||
go build -v .
|
|
||||||
|
|
||||||
# run acceptance tests in a matrix with Terraform core versions
|
# run acceptance tests in a matrix with Terraform core versions
|
||||||
test:
|
test:
|
||||||
@ -53,23 +51,19 @@ jobs:
|
|||||||
uses: actions/setup-go@v3
|
uses: actions/setup-go@v3
|
||||||
with:
|
with:
|
||||||
go-version: '1.18'
|
go-version: '1.18'
|
||||||
id: go
|
|
||||||
|
|
||||||
- name: Check out code into the Go module directory
|
- name: Check out code into the Go module directory
|
||||||
uses: actions/checkout@v3
|
uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: Get dependencies
|
- name: Get dependencies
|
||||||
run: |
|
run: go mod download
|
||||||
go mod download
|
|
||||||
|
|
||||||
- name: TF acceptance tests
|
- name: TF acceptance tests
|
||||||
timeout-minutes: 10
|
timeout-minutes: 10
|
||||||
env:
|
env:
|
||||||
TF_ACC: "1"
|
TF_ACC: "1"
|
||||||
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
|
TF_ACC_TERRAFORM_VERSION: ${{ matrix.terraform }}
|
||||||
|
run: go test -v -cover ./...
|
||||||
run: |
|
|
||||||
go test -v -cover ./...
|
|
||||||
|
|
||||||
all-tests-passed:
|
all-tests-passed:
|
||||||
name: All Tests Passed
|
name: All Tests Passed
|
||||||
|
@ -5,3 +5,11 @@ pull_request_rules:
|
|||||||
actions:
|
actions:
|
||||||
merge:
|
merge:
|
||||||
method: squash
|
method: squash
|
||||||
|
- name: automatic approval for bpg's pull requests
|
||||||
|
conditions:
|
||||||
|
- author=bpg
|
||||||
|
- label=autoapprove
|
||||||
|
actions:
|
||||||
|
review:
|
||||||
|
type: APPROVE
|
||||||
|
message: "Auto-approved! :robot:"
|
||||||
|
Loading…
Reference in New Issue
Block a user