-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
92af49c
commit eb33fd7
Showing
33 changed files
with
4,129 additions
and
10 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
*.go text eol=lf |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,6 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: gomod | ||
directory: / | ||
schedule: | ||
interval: weekly |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,75 @@ | ||
name: Nefilim Continuous Integration | ||
|
||
on: | ||
push: | ||
|
||
jobs: | ||
golangci: | ||
name: lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/setup-go@v4 | ||
with: | ||
go-version: 1.23 | ||
- uses: actions/checkout@v3 | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v1.60.3 | ||
args: --verbose | ||
|
||
test: | ||
strategy: | ||
matrix: | ||
go-version: [1.23] | ||
platform: [ubuntu-latest, macos-latest] | ||
|
||
runs-on: ${{ matrix.platform }} | ||
|
||
env: | ||
COVER_DIR: ${{ github.workspace }}/coverage | ||
COVER_FILE: coverage.out | ||
COVER_OUT_PATH: ${{ github.workspace }}/coverage/coverage.out | ||
COVER_HTML_PATH: ${{ github.workspace }}/coverage/coverage.html | ||
GINKGO_REPORT: ginkgo.report | ||
|
||
steps: | ||
- name: Install Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: ${{ matrix.go-version }} | ||
|
||
- name: Install goveralls | ||
run: go install github.com/mattn/goveralls@latest | ||
|
||
- name: Install ginkgo | ||
run: go install github.com/onsi/ginkgo/v2/[email protected] | ||
|
||
- name: Checkout code | ||
uses: actions/checkout@v4 | ||
|
||
- name: Ensure coverage directory exists | ||
run: | | ||
mkdir -p ${{ github.workspace }}/coverage | ||
- name: Run tests and generate coverage profile with Ginkgo | ||
run: | | ||
ginkgo run -r -json-report {{env.GINKGO_REPORT}} -coverpkg=./... -coverprofile=coverage.out | ||
- name: Apply coverage exclusions | ||
run: | | ||
${{ github.workspace }}/scripts/apply-coverage-exclusions.sh | ||
- name: Check coverage directory contents | ||
run: | | ||
echo "Contents of ${{ github.workspace }}/coverage:" | ||
ls -la ${{ github.workspace }}/coverage | ||
- name: Generate HTML coverage report | ||
run: | | ||
go tool cover -html=coverage.out -o ${{ github.workspace }}/coverage/coverage.html | ||
- name: Upload coverage to Coveralls | ||
uses: shogo82148/actions-goveralls@v1 | ||
with: | ||
path-to-profile: coverage.out |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,35 @@ | ||
name: Nefilim Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
goreleaser: | ||
if: startsWith(github.ref, 'refs/tags/') | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
with: | ||
fetch-depth: 0 | ||
- name: Git Fetch | ||
run: git fetch --force --tags | ||
- name: Setup | ||
uses: actions/setup-go@v3 | ||
with: | ||
go-version: '>=1.23' | ||
cache: true | ||
- name: Generate Changelog Only | ||
uses: goreleaser/goreleaser-action@v4 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,72 @@ | ||
linters-settings: | ||
errcheck: | ||
check-type-assertions: true | ||
goconst: | ||
min-len: 2 | ||
min-occurrences: 3 | ||
gocritic: | ||
enabled-tags: | ||
- diagnostic | ||
- experimental | ||
- opinionated | ||
- performance | ||
- style | ||
govet: | ||
shadow: true | ||
disable: | ||
- fieldalignment # too strict | ||
|
||
nolintlint: | ||
require-explanation: false | ||
require-specific: true | ||
linters: | ||
disable-all: true | ||
enable: | ||
- bodyclose | ||
# - deadcode | ||
# depguard needs to be reviewed properly and then configured, before | ||
# it can be re-enabled. | ||
# https://github.com/OpenPeeDeeP/depguard#example-configs | ||
# - depguard | ||
- copyloopvar | ||
- dogsled | ||
# - dupl | ||
- errcheck | ||
- exhaustive | ||
- goconst | ||
- gocritic | ||
- gofmt | ||
- goimports | ||
- gocyclo | ||
- gosec | ||
- gosimple | ||
- govet | ||
- ineffassign | ||
- misspell | ||
- mnd | ||
- nolintlint | ||
- nakedret | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- staticcheck | ||
# - structcheck | ||
- stylecheck | ||
- thelper | ||
- tparallel | ||
- unconvert | ||
- unparam | ||
# - varcheck | ||
- whitespace | ||
- wsl | ||
|
||
issues: | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 | ||
fix: true | ||
exclude: | ||
- "cuddle" | ||
|
||
run: | ||
issues-exit-code: 1 | ||
timeout: "5m" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
before: | ||
hooks: | ||
- go mod tidy | ||
# ? do we need a - go mod generate | ||
# - go mod generate | ||
|
||
builds: | ||
- id: "traverse" | ||
env: | ||
- CGO_ENABLED=0 | ||
goos: | ||
- linux | ||
- windows | ||
- darwin | ||
no_main_check: true | ||
skip: true | ||
|
||
archives: | ||
- format: tar.gz | ||
# this name template makes the OS and Arch compatible with the results of uname. | ||
name_template: >- | ||
{{ .ProjectName }}_ | ||
{{- title .Os }}_ | ||
{{- if eq .Arch "amd64" }}x86_64 | ||
{{- else if eq .Arch "386" }}i386 | ||
{{- else }}{{ .Arch }}{{ end }} | ||
{{- if .Arm }}v{{ .Arm }}{{ end }} | ||
# use zip for windows archives | ||
format_overrides: | ||
- goos: windows | ||
format: zip | ||
checksum: | ||
name_template: "checksums.txt" | ||
snapshot: | ||
name_template: "{{ incpatch .Version }}-next" | ||
changelog: | ||
use: github | ||
sort: asc | ||
filters: | ||
exclude: | ||
- "^docs:" | ||
- "^test:" | ||
groups: | ||
- title: "🚀 Features" | ||
regexp: '^.*?feat(\([[:word:]]+\))??!?:.+$' | ||
order: 0 | ||
- title: "🐛 Bug fixes" | ||
regexp: '^.*?fix(\([[:word:]]+\))??!?:.+$' | ||
order: 1 | ||
- title: "🥝 Others" | ||
order: 999 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,11 @@ | ||
repos: | ||
- repo: https://github.com/golangci/golangci-lint | ||
rev: v1.56.2 | ||
hooks: | ||
- id: golangci-lint | ||
|
||
- repo: https://github.com/pre-commit/pre-commit-hooks | ||
rev: v4.4.0 | ||
hooks: | ||
- id: no-commit-to-branch | ||
args: ["--branch", "master", "--branch", "main"] |
Oops, something went wrong.