Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore: add make-gen-delta workflow #54

Merged
merged 1 commit into from
Oct 3, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 42 additions & 0 deletions .github/workflows/make-gen-delta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
name: "make-gen-delta"
on:
- workflow_dispatch
- push
- workflow_call

permissions:
contents: read

jobs:
make-gen-delta:
name: "Check for uncommitted changes from make gen"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: '0'
- name: Determine Go version
id: get-go-version
# We use .go-version as our source of truth for current Go
# version, because "goenv" can react to it automatically.
run: |
echo "Building with Go $(cat .go-version)"
echo "go-version=$(cat .go-version)" >> "$GITHUB_OUTPUT"
- name: Set up Go
uses: actions/setup-go@v4
with:
go-version: "${{ steps.get-go-version.outputs.go-version }}"
- name: Running go mod tidy
run: |
go mod tidy
- name: Install Dependencies
run: |
make tools
- name: Running make fmt
run: |
make fmt
- name: Check for changes
run: |
git diff --exit-code
git status --porcelain
test -z "$(git status --porcelain)"
4 changes: 2 additions & 2 deletions codes.go
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
package gldap

// ldap result codes
// ldap result codes
const (
ResultSuccess = 0
ResultOperationsError = 1
Expand Down Expand Up @@ -154,7 +154,7 @@ var ResultCodeMap = map[uint16]string{
ResultAuthorizationDenied: "Authorization Denied",
}

// ldap application codes
// ldap application codes
const (
ApplicationBindRequest = 0
ApplicationBindResponse = 1
Expand Down
1 change: 0 additions & 1 deletion request_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -349,7 +349,6 @@ func TestConvertString(t *testing.T) {
}
for _, tc := range tests {
t.Run(tc.name, func(t *testing.T) {

assert, require := assert.New(t), require.New(t)

got, err := ConvertString(tc.encodedStrings...)
Expand Down
1 change: 1 addition & 0 deletions testdirectory/directory_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -157,6 +157,7 @@ func testSafeBuf(t *testing.T) *safeBuf {
buf: &strings.Builder{},
}
}

func (w *safeBuf) Write(p []byte) (n int, err error) {
w.mu.Lock()
defer w.mu.Unlock()
Expand Down
1 change: 1 addition & 0 deletions testing.go
Original file line number Diff line number Diff line change
Expand Up @@ -261,6 +261,7 @@ func testSafeBuf(t *testing.T) *safeBuf {
buf: &strings.Builder{},
}
}

func (w *safeBuf) Write(p []byte) (n int, err error) {
w.mu.Lock()
defer w.mu.Unlock()
Expand Down
Loading