Skip to content

Commit bcc71ae

Browse files
authored
refactor: 1.24 Go tools and move to pkg (#669)
* root: use 1.24 go tools directive * move to pkg closes #668 * use authentik version for coverage tags * fix test path * add semgrep
1 parent 8492700 commit bcc71ae

File tree

198 files changed

+36
-13
lines changed

Some content is hidden

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

198 files changed

+36
-13
lines changed

.github/workflows/semgrep.yml

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,27 @@
1+
name: semgrep
2+
on:
3+
workflow_dispatch: {}
4+
pull_request: {}
5+
push:
6+
branches:
7+
- main
8+
- master
9+
paths:
10+
- .github/workflows/semgrep.yml
11+
schedule:
12+
# random HH:MM to avoid a load spike on GitHub Actions at 00:00
13+
- cron: '12 15 * * *'
14+
jobs:
15+
semgrep:
16+
name: semgrep/ci
17+
runs-on: ubuntu-latest
18+
permissions:
19+
contents: read
20+
env:
21+
SEMGREP_APP_TOKEN: ${{ secrets.SEMGREP_APP_TOKEN }}
22+
container:
23+
image: semgrep/semgrep
24+
if: (github.actor != 'dependabot[bot]')
25+
steps:
26+
- uses: actions/checkout@v4
27+
- run: semgrep ci

.github/workflows/test.yml

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -69,7 +69,7 @@ jobs:
6969
-coverprofile=coverage.txt \
7070
-covermode=atomic \
7171
-cover \
72-
./internal/provider/ 2>&1 | tee test-output
72+
./pkg/provider/ 2>&1 | tee test-output
7373
- if: ${{ always() }}
7474
run: |
7575
go install github.com/jstemmer/go-junit-report/v2@latest
@@ -91,7 +91,9 @@ jobs:
9191
uses: codecov/codecov-action@0565863a31f2c772f9f0395002a31e3f06189574
9292
with:
9393
token: ${{ secrets.CODECOV_TOKEN }}
94+
flags: authentik-${{ matrix.authentik_version }}
9495
- if: ${{ always() }}
9596
uses: codecov/test-results-action@f2dba722c67b86c6caa034178c6e4d35335f6706
9697
with:
9798
token: ${{ secrets.CODECOV_TOKEN }}
99+
flags: authentik-${{ matrix.authentik_version }}

Makefile

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ build:
1717

1818
gen:
1919
golangci-lint run -v
20-
AUTHENTIK_URL="" go generate
20+
AUTHENTIK_URL="" go tool github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs
2121

2222
# see https://github.com/goauthentik/authentik/blob/main/Makefile#LL99-L113
2323
gen-client-go:

go.mod

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,6 @@ toolchain go1.24.1
77
require (
88
github.com/getsentry/sentry-go v0.31.1
99
github.com/go-openapi/runtime v0.28.0
10-
github.com/hashicorp/terraform-plugin-docs v0.21.0
1110
github.com/hashicorp/terraform-plugin-sdk v1.17.2
1211
github.com/hashicorp/terraform-plugin-sdk/v2 v2.36.1
1312
github.com/stretchr/testify v1.10.0
@@ -61,6 +60,7 @@ require (
6160
github.com/hashicorp/logutils v1.0.0 // indirect
6261
github.com/hashicorp/terraform-exec v0.22.0 // indirect
6362
github.com/hashicorp/terraform-json v0.24.0 // indirect
63+
github.com/hashicorp/terraform-plugin-docs v0.21.0 // indirect
6464
github.com/hashicorp/terraform-plugin-go v0.26.0 // indirect
6565
github.com/hashicorp/terraform-plugin-log v0.9.0 // indirect
6666
github.com/hashicorp/terraform-registry-address v0.2.4 // indirect
@@ -113,3 +113,5 @@ require (
113113
gopkg.in/yaml.v2 v2.4.0 // indirect
114114
gopkg.in/yaml.v3 v3.0.1 // indirect
115115
)
116+
117+
tool github.com/hashicorp/terraform-plugin-docs/cmd/tfplugindocs

main.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import (
77
"github.com/hashicorp/terraform-plugin-sdk/v2/helper/schema"
88
"github.com/hashicorp/terraform-plugin-sdk/v2/plugin"
99

10-
"goauthentik.io/terraform-provider-authentik/internal/provider"
10+
"goauthentik.io/terraform-provider-authentik/pkg/provider"
1111
)
1212

1313
// these will be set by the goreleaser configuration

pkg/README.md

Lines changed: 1 addition & 0 deletions
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.

tools/tools.go

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

0 commit comments

Comments
 (0)