Skip to content

Commit a3eb7f6

Browse files
committed
Add README, Dependabot configuration, and Go linting workflow
Add basic Golang lint that checks generated files, tidyness of go module formatting, combined with custom lint hook for repo-specific setup. Configure dependabot for UCI to keep workflows up-to-date. Update README with basic information.
1 parent 24eda9b commit a3eb7f6

File tree

3 files changed

+69
-2
lines changed

3 files changed

+69
-2
lines changed

.github/dependabot.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,6 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"

.github/workflows/go-lint.yml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
name: Go
2+
3+
on:
4+
workflow_call:
5+
inputs:
6+
go-version:
7+
required: false
8+
type: string
9+
default: '1.24'
10+
11+
jobs:
12+
lint:
13+
name: Lint
14+
runs-on: ubuntu-latest
15+
steps:
16+
- name: Checkout code
17+
uses: actions/checkout@v4
18+
- name: Set up Go
19+
uses: actions/setup-go@v5
20+
with:
21+
# TODO: Automate fetch from go.mod.
22+
go-version: '${{ inputs.go-version }}'
23+
- name: Run repo-specific setup
24+
uses: ./.github/actions/go-check-setup
25+
if: hashFiles('./.github/actions/go-lint-setup') != ''
26+
- name: Check module tidiness
27+
run: |
28+
go mod tidy
29+
git diff --exit-code go.mod
30+
git diff --exit-code go.sum
31+
- name: Vet Go files
32+
if: always()
33+
run: go vet ./...
34+
- name: Check formatting
35+
if: always()
36+
run: |
37+
if out="$(gofmt -s -l .)" && test -n "$out"; then
38+
echo "Files not gofmt-ed:"
39+
echo "$out";
40+
exit 1
41+
fi
42+
- name: Check generated files
43+
if: always()
44+
run: |
45+
go generate -x ./...
46+
git diff --exit-code

README.md

Lines changed: 17 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,17 @@
1-
# uci
2-
Unified Continuous Integration
1+
# UCI: Unified Continuous Integration
2+
3+
**UCI (Unified Continuous Integration)** is Sei’s **standard engineering guardrail** for CI. It delivers **consistency** across repositories and **maintainability** through shared, versioned workflows and sensible defaults.
4+
5+
* **Consistency:** One pattern for lint/test/build so teams don’t reinvent CI per repo.
6+
* **Maintainability:** Centralized modules reduce duplication and drift, making updates safer and faster.
7+
8+
## Status
9+
10+
🚧 **Active development.**
11+
Current, focus is to support **Golang**; additional languages may be added later.
12+
13+
## Principles
14+
15+
* **Consistency first:** Shared templates & defaults are the norm; overrides are opt-in and minimal.
16+
* **Maintainability at scale:** Central updates propagate safely; repos stay aligned.
17+
* **Guardrails, not handcuffs:** Opinionated by default, extensible where it counts.

0 commit comments

Comments
 (0)