Skip to content
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.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions .github/pull_request_template.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
<!--
NOTE: we use conventional commits to describe the type of change for at-a-glance
reviews and change notes generations. Please make sure the PR title is prefixed with a
[FEAT] or [FIX] tag or any tag as described by:

https://www.conventionalcommits.org/en/v1.0.0-beta.2/
-->

### Scope of changes

<!--
Describe the problem you're trying to solve and the fix/solution that you've implemented in this PR.
-->

Fixes SC-XXXXX

### Estimated PR Size:

- [ ] Tiny
- [ ] Small
- [ ] Medium
- [ ] Large
- [ ] Huge

### Acceptance criteria

<!--
Describe how reviewers can test this change to be sure that it works correctly or copy the requirements from the Shortcut story. Add a checklist below if possible.
-->

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
<!--
- [ ] Check this box if a reviewer can merge this pull request after approval (leave it unchecked if you want to do it yourself)

### Reviewer(s) checklist

- [ ] Any new user-facing content that has been added for this PR has been QA'ed to ensure correct grammar, spelling, and understandability.
- [ ] To the best of my ability, I believe that this PR represents a good solution to the specified problem and that it should be merged into the main code base.
-->
85 changes: 85 additions & 0 deletions .github/workflows/tests.yaml
Original file line number Diff line number Diff line change
@@ -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/...
15 changes: 13 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
@@ -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.
3 changes: 3 additions & 0 deletions cmd/enumify/main.go
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
package main

func main() {}
1 change: 1 addition & 0 deletions enumify.go
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
package enumify
3 changes: 3 additions & 0 deletions go.mod
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
module go.rtnl.ai/enumify

go 1.26.1
Loading