Skip to content

Commit

Permalink
Merge pull request #23 from jgwest/add-go-fmt-check-jan
Browse files Browse the repository at this point in the history
Add gofmt check and fix branch names
  • Loading branch information
jgwest authored Jan 23, 2024
2 parents 35c8050 + 534ba2b commit 1b34bfd
Show file tree
Hide file tree
Showing 3 changed files with 24 additions and 3 deletions.
2 changes: 1 addition & 1 deletion .github/workflows/e2e_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ name: Run E2E tests
on:
push:
branches:
- 'master'
- 'main'
- 'release-*'
pull_request:
branches:
Expand Down
17 changes: 16 additions & 1 deletion .github/workflows/go.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ name: Go
on:
push:
branches:
- 'master'
- 'main'
- 'release-*'
pull_request:
branches:
Expand All @@ -29,3 +29,18 @@ jobs:

- name: Test
run: make test

gofmt:
name: "Ensure that code is gofmt-ed"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@master
- name: Setup Golang
uses: actions/[email protected]
with:
go-version-file: './go.mod'
- name: "Run make fmt and then 'git diff' to see if anything changed: to fix this check, run make fmt and then commit the changes."
run: |
make fmt
git diff --exit-code -- .
8 changes: 7 additions & 1 deletion .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -1,12 +1,18 @@
name: Lint code
on:

push:
branches:
- 'main'
- 'release-*'

pull_request:
branches:
- '*'

jobs:
lint_code:
name: Run golangci-lint and gosec on PR
name: Run golangci-lint and gosec
runs-on: ubuntu-latest
steps:
- name: Checkout code
Expand Down

0 comments on commit 1b34bfd

Please sign in to comment.