Skip to content

Commit

Permalink
Pre-commit via make (#6)
Browse files Browse the repository at this point in the history
  • Loading branch information
hiddenmarten authored Mar 14, 2024
1 parent b6adcc3 commit ffea74d
Show file tree
Hide file tree
Showing 6 changed files with 44 additions and 5 deletions.
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
name: Pre-commit

on:
pull_request:

jobs:
pre-commit:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-go@v5
with:
go-version: 1.22.1
- uses: pre-commit/action@v3.0.1
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# See https://pre-commit.com for more information
# See https://pre-commit.com/hooks.html for more hooks
repos:
- repo: https://github.com/pre-commit/pre-commit-hooks
rev: v3.2.0
hooks:
- id: trailing-whitespace
- id: end-of-file-fixer
- id: check-added-large-files
- repo: local
hooks:
- id: make-fmt
name: make-fmt
entry: sh -c "make fmt"
language: system
- id: make-vet
name: make-vet
entry: sh -c "make vet"
language: system
- id: make-lint-fix
name: make-lint-fix
entry: sh -c "make lint-fix"
language: system
require_serial: true
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
# Build the manager binary
FROM golang:1.21 AS builder
FROM golang:1.22.1 AS builder
ARG TARGETOS TARGETARCH

WORKDIR /workspace
Expand Down
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ The etcd-operator is designed for developers and operators looking for a robust

## Versioning

Versioning adheres to the [Semantic Versioning](http://semver.org/) principles.
Versioning adheres to the [Semantic Versioning](http://semver.org/) principles.
A full list of the available releases is available in the GitHub repository's [Release](https://github.com/aenix-io/etcd-operator/releases) section.

- [Roadmap](https://github.com/orgs/aenix-io/projects/1)
Expand All @@ -38,5 +38,5 @@ In case of **Feature Requests** please use the [Discussion's Feature Request sec

## License

etcd-operator is licensed under Apache 2.0.
etcd-operator is licensed under Apache 2.0.
The code is provided as-is with no warranties.
2 changes: 1 addition & 1 deletion hack/boilerplate.go.txt
Original file line number Diff line number Diff line change
Expand Up @@ -12,4 +12,4 @@ distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
*/
*/
3 changes: 2 additions & 1 deletion test/e2e/e2e_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -73,7 +73,8 @@ var _ = Describe("controller", Ordered, func() {

By("installing CRDs")
cmd = exec.Command("make", "install")
_, err = utils.Run(cmd)
// TODO: Handle CRD installation error
_, _ = utils.Run(cmd)

By("deploying the controller-manager")
cmd = exec.Command("make", "deploy", fmt.Sprintf("IMG=%s", projectimage))
Expand Down

0 comments on commit ffea74d

Please sign in to comment.