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

Pre-commit via make #6

Merged
merged 5 commits into from Mar 14, 2024
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.
Jump to
Jump to file
Failed to load files.
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/pre-commit.yaml
@@ -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
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We have version 1.21 in Dockerfile

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, thanks

- uses: pre-commit/action@v3.0.1
24 changes: 24 additions & 0 deletions .pre-commit-config.yaml
@@ -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
@@ -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
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
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
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)
Comment on lines -76 to +77
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Is it still makes sense after #15 get merged?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yep, it's a linter validation issue.


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