diff --git a/.github/pull_request_template.md b/.github/pull_request_template.md new file mode 100644 index 0000000..593802d --- /dev/null +++ b/.github/pull_request_template.md @@ -0,0 +1,47 @@ + + +### Scope of changes + + + +Fixes SC-XXXXX + +### Estimated PR Size: + +- [ ] Tiny +- [ ] Small +- [ ] Medium +- [ ] Large +- [ ] Huge + +### Acceptance criteria + + + +This PR will be merged without review. + +### Author checklist + +- [ ] I have manually tested the change and/or added automation in the form of unit tests or integration tests +- [ ] I have updated the dependencies list +- [ ] I have added new test fixtures as needed to support added tests +- [ ] I have added or updated the documentation +- [ ] I have run go generate to update generated code + \ No newline at end of file diff --git a/.github/workflows/tests.yaml b/.github/workflows/tests.yaml new file mode 100644 index 0000000..52a6d96 --- /dev/null +++ b/.github/workflows/tests.yaml @@ -0,0 +1,85 @@ +name: CI Tests +on: + push: + branches: + - main + - 'v*' + tags: + - 'v*' + pull_request: + +jobs: + go-lint: + name: Go Lint + runs-on: ubuntu-latest + steps: + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: 1.26.x + + - name: Install Staticcheck + run: go install honnef.co/go/tools/cmd/staticcheck@2026.1 + + - name: Checkout Code + uses: actions/checkout@v6 + + - name: Lint Go Code + run: staticcheck ./... + + go-test: + name: Go Test + runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }}/go + GOBIN: ${{ github.workspace }}/go/bin + GOTEST_GITHUB_ACTIONS: 1 + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + steps: + - name: Setup Go + uses: actions/setup-go@v6 + with: + go-version: 1.26.x + + - name: Checkout Code + uses: actions/checkout@v6 + with: + path: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + + - name: Install Dependencies + run: | + go version + + - name: Code Generation + run: go generate ./... + + - name: Run Unit Tests + run: go test -v -coverprofile=coverage.txt -covermode=atomic --race ./... + + build: + name: Go Build + runs-on: ubuntu-latest + env: + GOPATH: ${{ github.workspace }}/go + GOBIN: ${{ github.workspace }}/go/bin + defaults: + run: + working-directory: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + steps: + - name: Set up Go + uses: actions/setup-go@v6 + with: + go-version: 1.26.x + + - name: Checkout Code + uses: actions/checkout@v6 + with: + path: ${{ env.GOPATH }}/src/go.rtnl.ai/enumify + - name: Install Dependencies + run: | + go version + + - name: Build + run: go build ./cmd/... diff --git a/README.md b/README.md index 046a1f5..ab8a37b 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,13 @@ -# enumify -Easily create and manage typed enumerations with code generation and automated enum tests. +# Enumify + +**Easily create and manage typed enumerations with code generation and automated enum tests.** + +We found ourselves generating a lot of boilerplate code for our Enums: particularly for parsing, serialization/deserialization, database storage, and tests. Really we just want to be able to describe an Enum and get all of this code for free! Enumify is the combination of a code generator for the boilerplate code as well as a package for reducing the boilerplate and ensuring that everything works as expected. + +## License + +This project is licensed under the BSD 3-Clause License. See [`LICENSE`](./LICENSE) for details. Please feel free to use Enumify in your own projects and applications. + +## About Rotational Labs + +Enumify is developed by [Rotational Labs](https://rotational.io), a team of engineers and scientists building AI infrastructure for serious work. diff --git a/cmd/enumify/main.go b/cmd/enumify/main.go new file mode 100644 index 0000000..38dd16d --- /dev/null +++ b/cmd/enumify/main.go @@ -0,0 +1,3 @@ +package main + +func main() {} diff --git a/enumify.go b/enumify.go new file mode 100644 index 0000000..9ea6f0c --- /dev/null +++ b/enumify.go @@ -0,0 +1 @@ +package enumify diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..fe122b4 --- /dev/null +++ b/go.mod @@ -0,0 +1,3 @@ +module go.rtnl.ai/enumify + +go 1.26.1