Added license, and CI workflow for Gitea and GitHub Actions.
All checks were successful
CI / test (push) Successful in 16s

This commit is contained in:
2026-02-21 00:48:20 +01:00
parent 09a1c8dd26
commit 74074656be
9 changed files with 109 additions and 0 deletions

33
.gitea/workflows/ci.yml Normal file
View File

@@ -0,0 +1,33 @@
name: CI
on:
push:
branches: ["**"]
pull_request:
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify formatting
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "These files are not gofmt-formatted:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...

36
.github/workflows/ci.yml vendored Normal file
View File

@@ -0,0 +1,36 @@
name: CI
on:
push:
branches: ["**"]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup Go
uses: actions/setup-go@v5
with:
go-version-file: go.mod
- name: Verify formatting
run: |
unformatted=$(gofmt -l .)
if [ -n "$unformatted" ]; then
echo "These files are not gofmt-formatted:"
echo "$unformatted"
exit 1
fi
- name: Vet
run: go vet ./...
- name: Test
run: go test -v ./...

21
LICENSE Normal file
View File

@@ -0,0 +1,21 @@
MIT License
Copyright (c) 2026 Micha Hoiting
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

View File

@@ -1,3 +1,5 @@
# Copyright (c) 2026 Micha Hoiting
APP_EXAMPLE := triplex-example
.PHONY: test build-example run-example fmt

View File

@@ -1,5 +1,10 @@
Copyright (c) 2026 Micha Hoiting
# triplex
[![Gitea CI](https://git.hoiting.org/micha/triplex/actions/workflows/ci.yml/badge.svg)](https://git.hoiting.org/micha/triplex/actions)
[![GitHub CI](https://github.com/micha/triplex/actions/workflows/ci.yml/badge.svg)](https://github.com/micha/triplex/actions/workflows/ci.yml)
`triplex` is a deterministic, reversible serial number engine for
high-integrity identifiers. It maps a compact 32-bit integer space to a
human-readable serial format:
@@ -119,3 +124,7 @@ Run all tests:
```bash
go test ./...
```
## License
This project is licensed under the MIT License. See [LICENSE](LICENSE).

View File

@@ -1,3 +1,5 @@
// Copyright (c) 2026 Micha Hoiting
package main
import (

2
go.mod
View File

@@ -1,3 +1,5 @@
// Copyright (c) 2026 Micha Hoiting
module git.hoiting.org/micha/triplex
go 1.25.0

View File

@@ -1,3 +1,5 @@
// Copyright (c) 2026 Micha Hoiting
package serial
import (

View File

@@ -1,3 +1,5 @@
// Copyright (c) 2026 Micha Hoiting
package serial_test
import (