Skip to content

Commit

Permalink
chore: add make-gen-delta workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
jimlambrt committed Oct 3, 2023
1 parent 0090f76 commit c8699a1
Show file tree
Hide file tree
Showing 5 changed files with 46 additions and 3 deletions.
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

0 comments on commit c8699a1

Please sign in to comment.