-
-
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
2ce81c2
commit e3ba99d
Showing
7 changed files
with
142 additions
and
14 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 @@ | ||
github: jaredallard |
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,14 @@ | ||
<!-- | ||
!!!! README !!!! Please fill this out. | ||
Please follow conventional commit naming conventions: | ||
https://www.conventionalcommits.org/en/v1.0.0/#summary | ||
--> | ||
|
||
<!-- A short description of what your PR does and what it solves. --> | ||
## What this PR does / why we need it | ||
|
||
|
||
<!-- Notes that may be helpful for anyone reviewing this PR --> | ||
## Notes for your reviewers |
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,54 @@ | ||
name: tests | ||
on: | ||
push: | ||
branches: | ||
- main | ||
pull_request: | ||
|
||
permissions: | ||
contents: read | ||
|
||
concurrency: | ||
group: stencil-build-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
gotest: | ||
name: go test | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: jdx/mise-action@v2 | ||
with: | ||
experimental: true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Run go test | ||
run: | | ||
gotestsum -f github-actions -- -coverprofile=cover.out ./... | ||
- name: Upload test coverage | ||
uses: codecov/codecov-action@v4.0.1 | ||
with: | ||
token: ${{ secrets.CODECOV_TOKEN }} | ||
files: ./cover.out | ||
fail_ci_if_error: true | ||
|
||
golangci-lint: | ||
name: golangci-lint | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: jdx/mise-action@v2 | ||
with: | ||
experimental: true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Retrieve golangci-lint version | ||
run: | | ||
echo "version=$(mise current golangci-lint)" >> "$GITHUB_OUTPUT" | ||
id: golangci_lint | ||
- name: golangci-lint | ||
uses: golangci/golangci-lint-action@v3 | ||
with: | ||
version: v${{ steps.golangci_lint.outputs.version }} | ||
args: --timeout=30m |
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,46 @@ | ||
name: goreleaser | ||
|
||
on: | ||
push: | ||
# Run only on tags | ||
tags: | ||
- "*" | ||
|
||
permissions: | ||
contents: write | ||
packages: write | ||
|
||
concurrency: | ||
group: stencil-release-${{ github.head_ref }} | ||
cancel-in-progress: true | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: jdx/mise-action@v2 | ||
with: | ||
experimental: true | ||
env: | ||
GH_TOKEN: ${{ github.token }} | ||
- name: Retrieve goreleaser version | ||
run: | | ||
echo "version=$(mise current goreleaser)" >> "$GITHUB_OUTPUT" | ||
id: goreleaser | ||
- name: Login to GitHub Container Registry | ||
uses: docker/login-action@v3 | ||
with: | ||
registry: ghcr.io | ||
username: ${{ github.actor }} | ||
password: ${{ secrets.GITHUB_TOKEN }} | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: v${{ steps.goreleaser.outputs.version }} | ||
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,3 @@ | ||
bin | ||
*.out | ||
.DS_Store |
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 |
---|---|---|
@@ -1,2 +1,18 @@ | ||
[tools] | ||
golang = "1.22" | ||
golangci-lint = "1.56.2" | ||
"go:gotest.tools/gotestsum" = "v1.11.0" | ||
"go:golang.org/x/tools/cmd/goimports" = "latest" | ||
|
||
[tasks.tests] | ||
description = "Run tests" | ||
run = ["gotestsum", "golangci-lint run --allow-parallel-runners --fast"] | ||
|
||
[tasks.fmt] | ||
alias = "format" | ||
description = "Format code" | ||
run = ["goimports -w ."] | ||
|
||
[tasks.build] | ||
description = "Build the project" | ||
run = ["go mod download", "go build -trimpath -o bin/ ./cmd/..."] |
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