Skip to content

Commit 5194fcb

Browse files
committed
Release 2.6.0 (#61)
2 parents fe120f5 + d851c4b commit 5194fcb

File tree

131 files changed

+7169
-333
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

131 files changed

+7169
-333
lines changed

.github/workflows/build.yml

Lines changed: 50 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,16 @@
1-
name: CI
1+
name: Build
22

33
on:
44
push:
5-
branches:
6-
- develop
7-
- feature/.*
8-
- '!master' # excludes master
5+
branches-ignore:
6+
- master
97
pull_request:
8+
workflow_dispatch:
109

1110
jobs:
12-
ContinousIntegration:
11+
12+
ci:
13+
name: Continous Integration
1314
runs-on: ubuntu-latest
1415
steps:
1516
- name: Checkout
@@ -21,16 +22,52 @@ jobs:
2122
go-version-file: 'go.mod'
2223
cache: true
2324

24-
- name: Download modules
25-
run: go mod download
25+
- name: Install dependencies
26+
run: |
27+
go mod download
28+
go install github.com/ctrf-io/go-ctrf-json-reporter/cmd/go-ctrf-json-reporter@latest
2629
2730
- name: Build
2831
run: go build -v .
2932

30-
- name: Unit Testing
31-
run: go test -v ./...
33+
- name: Run Uniting-Tests
34+
run: go test -json ./... > go-test.json
35+
36+
- name: Publish Uniting-Tests
37+
run: |
38+
cat go-test.json | go-ctrf-json-reporter -output ctrf-report.json
39+
npx github-actions-ctrf summary ctrf-report.json
40+
npx github-actions-ctrf failed ctrf-report.json
41+
if: always()
42+
43+
cd-assets:
44+
name: Continous Delivry - Assets
45+
needs: ci
46+
if: github.ref_name == 'develop' || github.event_name == 'pull_request' || github.event == 'workflow_dispatch'
47+
runs-on: ubuntu-latest
48+
steps:
49+
- name: Checkout code
50+
uses: actions/checkout@v4
51+
52+
- name: Import GPG key
53+
uses: crazy-max/ghaction-import-gpg@v6
54+
id: import_gpg
55+
with:
56+
gpg_private_key: ${{ secrets.GPG_PRIVATE_KEY }}
57+
passphrase: ${{ secrets.PASSPHRASE }}
58+
59+
- name: Run GoReleaser
60+
uses: goreleaser/goreleaser-action@v6
61+
with:
62+
args: release --clean --snapshot
63+
env:
64+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
65+
GPG_FINGERPRINT: ${{ steps.import_gpg.outputs.fingerprint }}
3266

33-
- name: Run linters
34-
uses: golangci/golangci-lint-action@v6
67+
- name: Upload assets
68+
uses: actions/upload-artifact@v4
3569
with:
36-
version: latest
70+
name: terraform-provider-rabbitmq
71+
path: |
72+
dist/*.tar.gz
73+
dist/*.zip

.github/workflows/checkpr.yml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
name: 'Check PR'
2+
3+
on:
4+
pull_request:
5+
branches:
6+
- master
7+
8+
jobs:
9+
check_branch:
10+
name: Check PR
11+
runs-on: ubuntu-latest
12+
steps:
13+
- name: Check origin branch
14+
if: github.head_ref != 'develop'
15+
run: |
16+
echo "::error::You can only merge to 'main' from 'develop'!" && exit 1

.github/workflows/master.yml

Lines changed: 82 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,82 @@
1+
name: Master
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
workflow_dispatch:
8+
9+
jobs:
10+
11+
build:
12+
name: Tag
13+
runs-on: ubuntu-latest
14+
steps:
15+
- name: Checkout code
16+
uses: actions/checkout@v4
17+
with:
18+
token: ${{ secrets.PAT_TAG }}
19+
# https://docs.github.com/en/actions/how-tos/write-workflows/choose-when-workflows-run/trigger-a-workflow
20+
# https://stackoverflow.com/questions/57921401/push-to-origin-from-github-action
21+
22+
- name: Extract Tag
23+
run: |
24+
set -ex
25+
COMMIT_MESSAGE=$(git log -n 1 --pretty=format:%s)
26+
TAG=$(echo $COMMIT_MESSAGE | sed -nE 's/^(Release|release) ([0-9]+\.[0-9]+\.[0-9]+) \(#[0-9]+\)$/\2/p')
27+
28+
if [ -z "$TAG" ]; then
29+
echo "::error::The release version can't be found into the commit message!" && exit 1
30+
else
31+
echo "TAG=$TAG" >> $GITHUB_ENV
32+
fi
33+
34+
- name: Create Tag
35+
run: |
36+
set -ex
37+
git config user.name "github-actions"
38+
git config user.email "[email protected]"
39+
git tag -a v$TAG -m "Release $TAG"
40+
git push --follow-tags
41+
42+
43+
report:
44+
name: Codecov
45+
runs-on: ubuntu-latest
46+
permissions:
47+
contents: read
48+
pull-requests: read
49+
steps:
50+
- name: Checkout code
51+
uses: actions/checkout@v4
52+
53+
- name: Set up Go
54+
uses: actions/setup-go@v5
55+
with:
56+
go-version-file: 'go.mod'
57+
cache: true
58+
59+
- name: Install dependencies
60+
run: |
61+
go mod download
62+
go install github.com/jstemmer/go-junit-report/v2@latest
63+
64+
- name: Run all tests
65+
run: |
66+
set -e
67+
. ./scripts/testacc.env
68+
./scripts/testacc.sh setup
69+
go test -v -coverprofile=coverage.out ./internal/provider/... | go-junit-report -set-exit-code > junit.xml
70+
./scripts/testacc.sh cleanup
71+
72+
- name: Upload test results to Codecov
73+
uses: codecov/test-results-action@v1
74+
with:
75+
token: ${{ secrets.CODECOV_TOKEN }}
76+
77+
- name: Upload coverage reports to Codecov
78+
uses: codecov/codecov-action@v5
79+
with:
80+
verbose: true
81+
token: ${{ secrets.CODECOV_TOKEN }}
82+
slug: rfd59/terraform-provider-rabbitmq

.github/workflows/quality.yml

Lines changed: 70 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,70 @@
1+
name: Code Quality
2+
3+
on:
4+
push:
5+
branches:
6+
- develop
7+
- dev/quality
8+
pull_request:
9+
workflow_dispatch:
10+
11+
permissions:
12+
contents: read
13+
pull-requests: read
14+
15+
jobs:
16+
coverage:
17+
name: Coverage Quality
18+
runs-on: ubuntu-latest
19+
steps:
20+
- name: Checkout code
21+
uses: actions/checkout@v4
22+
23+
- name: Set up Go
24+
uses: actions/setup-go@v5
25+
with:
26+
go-version-file: 'go.mod'
27+
cache: true
28+
29+
- name: Install dependencies
30+
run: |
31+
go mod download
32+
go install github.com/jstemmer/go-junit-report/v2@latest
33+
34+
- name: Run all tests
35+
run: |
36+
set -e
37+
. ./scripts/testacc.env
38+
./scripts/testacc.sh setup
39+
go test -v -coverprofile=coverage.out ./internal/provider/... | go-junit-report -set-exit-code > junit.xml
40+
./scripts/testacc.sh cleanup
41+
42+
- name: Upload test results to Codecov
43+
if: ${{ !cancelled() }}
44+
uses: codecov/test-results-action@v1
45+
with:
46+
token: ${{ secrets.CODECOV_TOKEN }}
47+
48+
- name: Upload coverage reports to Codecov
49+
uses: codecov/codecov-action@v5
50+
with:
51+
token: ${{ secrets.CODECOV_TOKEN }}
52+
slug: rfd59/terraform-provider-rabbitmq
53+
54+
golangci-lint:
55+
name: Source Quality
56+
runs-on: ubuntu-latest
57+
steps:
58+
- name: Checkout code
59+
uses: actions/checkout@v4
60+
61+
- name: Set up Go
62+
uses: actions/setup-go@v5
63+
with:
64+
go-version-file: 'go.mod'
65+
cache: true
66+
67+
- name: Run golangci-lint
68+
uses: golangci/golangci-lint-action@v8
69+
with:
70+
version: latest

.github/workflows/release.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,7 @@ jobs:
3535
passphrase: ${{ secrets.PASSPHRASE }}
3636

3737
- name: Run GoReleaser
38-
uses: goreleaser/goreleaser-action@v5
38+
uses: goreleaser/goreleaser-action@v6
3939
with:
4040
args: release --clean
4141
env:

.github/workflows/sonar.yml

Lines changed: 0 additions & 34 deletions
This file was deleted.

.github/workflows/test.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -2,10 +2,10 @@ name: Tests
22

33
on:
44
push:
5-
branches:
6-
- '**' # matches every branch
7-
- '!master' # excludes master
5+
branches-ignore:
6+
- master
87
pull_request:
8+
workflow_dispatch:
99

1010
jobs:
1111
acceptance:

.golangci.yml

Lines changed: 8 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,17 @@
1-
# Visit https://golangci-lint.run/ for usage documentation
2-
# and information on other useful linters
1+
version: "2"
2+
33
issues:
44
max-issues-per-linter: 0
55
max-same-issues: 0
66

77
linters:
8-
disable-all: true
8+
default: none
99
enable:
1010
- durationcheck
1111
# - errcheck
1212
- copyloopvar
1313
# - forcetypeassert
1414
# - godot
15-
- gofmt
16-
- gosimple
1715
- ineffassign
1816
- makezero
1917
- misspell
@@ -25,3 +23,8 @@ linters:
2523
- unused
2624
- govet
2725
- testifylint
26+
27+
formatters:
28+
enable:
29+
- gofmt
30+
- goimports

0 commit comments

Comments
 (0)