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
|
||||
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
|
||||
|
@ -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:"
|
||||
|
Loading…
Reference in New Issue
Block a user