-
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.
* added cobra cli * added github workflows * added taskfiles * added docs
- Loading branch information
Showing
45 changed files
with
34,339 additions
and
0 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,16 @@ | ||
--- | ||
# codecov: | ||
# require_ci_to_pass: yes | ||
|
||
coverage: | ||
precision: 2 | ||
round: down | ||
range: "50...100" | ||
|
||
comment: | ||
layout: "reach,diff,flags,files,footer" | ||
behavior: default | ||
require_changes: false | ||
|
||
ignore: | ||
- "**/*_mock.go" |
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,23 @@ | ||
--- | ||
version: 2 | ||
updates: | ||
- package-ecosystem: "github-actions" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: chore | ||
|
||
- package-ecosystem: "gomod" | ||
directory: "/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: chore | ||
|
||
- package-ecosystem: "gomod" | ||
directory: "examples/go-client/" | ||
schedule: | ||
interval: "daily" | ||
commit-message: | ||
prefix: chore |
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,30 @@ | ||
--- | ||
test/unit: | ||
- changed-files: | ||
- any-glob-to-any-file: "**/*_test.go" | ||
|
||
test/integration: | ||
- changed-files: | ||
- any-glob-to-any-file: "tests/*" | ||
- any-glob-to-any-file: "tests/*/**" | ||
|
||
kind/go: | ||
- changed-files: | ||
- any-glob-to-any-file: "**/*.go" | ||
|
||
kind/yaml: | ||
- changed-files: | ||
- any-glob-to-any-file: "**/*.yaml" | ||
- any-glob-to-any-file: "**/*.yml" | ||
|
||
kind/docs: | ||
- changed-files: | ||
- any-glob-to-any-file: "docs/*" | ||
- any-glob-to-any-file: "docs/*/**" | ||
|
||
github/action: | ||
- changed-files: | ||
- any-glob-to-any-file: ".github/**/*.yml" | ||
|
||
release: | ||
- base-branch: 'main' |
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,15 @@ | ||
--- | ||
name: Cleanup | ||
|
||
on: | ||
pull_request: | ||
types: [closed] | ||
|
||
jobs: | ||
delete-branch: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: delete branch | ||
uses: SvanBoxel/delete-merged-branch@main | ||
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,13 @@ | ||
name: Conventional Commits | ||
on: | ||
pull_request: | ||
branches: [ "main" ] | ||
jobs: | ||
build: | ||
name: Conventional Commits | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: webiny/action-conventional-commits@v1.3.0 | ||
with: | ||
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,15 @@ | ||
--- | ||
name: 'Dependency Review' | ||
on: [pull_request] | ||
|
||
permissions: | ||
contents: read | ||
|
||
jobs: | ||
dependency-review: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: 'Checkout Repository' | ||
uses: actions/checkout@v4 | ||
- name: 'Dependency Review' | ||
uses: actions/dependency-review-action@v4 |
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,28 @@ | ||
--- | ||
name: Test Deploy to GitHub Pages | ||
|
||
on: | ||
pull_request: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
test-deploy: | ||
name: Test deployment | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
cache-dependency-path: ./docs/yarn.lock | ||
- name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Lint the website | ||
run: task docs:fmt:check | ||
- name: Test build website | ||
run: task docs:build |
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,49 @@ | ||
--- | ||
name: Deploy to GitHub Pages | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
permissions: | ||
contents: write | ||
|
||
jobs: | ||
deploy: | ||
name: Deploy to GitHub Pages | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- uses: actions/setup-node@v4 | ||
with: | ||
node-version: 20 | ||
cache: yarn | ||
cache-dependency-path: ./docs/yarn.lock | ||
- name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Build website | ||
run: task docs:build | ||
|
||
# Popular action to deploy to GitHub Pages: | ||
# Docs: https://github.com/peaceiris/actions-gh-pages#%EF%B8%8F-docusaurus | ||
- name: Deploy to GitHub Pages | ||
uses: peaceiris/actions-gh-pages@v3 | ||
with: | ||
github_token: ${{ secrets.GITHUB_TOKEN }} | ||
# Build output to publish to the `gh-pages` branch: | ||
publish_dir: ./docs/build | ||
# The following lines assign commit authorship to the official | ||
# GH-Actions bot for deploys to `gh-pages` branch: | ||
# https://github.com/actions/checkout/issues/13#issuecomment-724415212 | ||
# The GH actions bot is used by default if you didn't specify the two fields. | ||
# You can swap them out with your own user credentials. | ||
user_name: github-actions[bot] | ||
user_email: 41898282+github-actions[bot]@users.noreply.github.com | ||
|
||
|
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,29 @@ | ||
--- | ||
name: Go | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
pull_request: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
- name: Set up Go | ||
uses: actions/setup-go@v5 | ||
with: | ||
go-version: '1.21' | ||
- name: Install Task | ||
uses: arduino/setup-task@v2 | ||
with: | ||
version: 3.x | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
- name: Test | ||
run: task test ARCH=amd64_v1 GOOS=linux | ||
- name: Upload coverage reports to Codecov | ||
uses: codecov/codecov-action@v4 | ||
env: | ||
CODECOV_TOKEN: ${{ secrets.CODECOV_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,21 @@ | ||
--- | ||
name: Greetings | ||
|
||
on: [pull_request, issues] | ||
|
||
jobs: | ||
greeting: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/first-interaction@v1 | ||
if: env.month != 'Oct' | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: 'Thank you for your first issue! 😊🕹️' | ||
pr-message: 'Thank you for contributing to this project! 😊🕹️' | ||
- uses: actions/first-interaction@v1 | ||
if: env.month == 'Oct' | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
issue-message: 'Thank you for your first issue! Happy Hacktoberfest!!! 🎃👕🕹️' | ||
pr-message: 'Thank you for contributing to this project. Happy Hacktoberfest!!! 🎃👕🕹️' |
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,13 @@ | ||
--- | ||
name: "Pull Request Labeler" | ||
on: | ||
- pull_request_target | ||
|
||
jobs: | ||
triage: | ||
permissions: | ||
contents: read | ||
pull-requests: write | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/labeler@v5 |
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,30 @@ | ||
--- | ||
name: goreleaser | ||
on: | ||
push: | ||
tags: | ||
- "v*" | ||
|
||
permissions: | ||
contents: write | ||
# packages: write | ||
# issues: write | ||
|
||
jobs: | ||
goreleaser: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v4 | ||
with: | ||
fetch-depth: 0 | ||
- run: git fetch --force --tags | ||
- uses: actions/setup-go@v5 | ||
with: | ||
go-version: stable | ||
- uses: goreleaser/goreleaser-action@v5 | ||
with: | ||
distribution: goreleaser | ||
version: latest | ||
args: release --clean | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GH_PAT }} |
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 @@ | ||
--- | ||
name: Go Report Card | ||
|
||
on: | ||
push: | ||
branches: [ "main" ] | ||
|
||
jobs: | ||
action_goreportcard: | ||
runs-on: ubuntu-latest | ||
name: A job to run go report card | ||
steps: | ||
- name: Go Report Card | ||
uses: creekorful/goreportcard-action@v1.0 |
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,18 @@ | ||
--- | ||
name: Mark stale issues and pull requests | ||
|
||
on: | ||
schedule: | ||
- cron: "30 1 * * *" | ||
|
||
jobs: | ||
stale: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/stale@v9 | ||
with: | ||
repo-token: ${{ secrets.GITHUB_TOKEN }} | ||
stale-issue-message: 'Stale issue message' | ||
stale-pr-message: 'Stale pull request message' | ||
stale-issue-label: 'no-issue-activity' | ||
stale-pr-label: 'no-pr-activity' |
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,5 @@ | ||
cobertura.xml | ||
cover.out | ||
dist/ | ||
result.xml | ||
.task/ |
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,30 @@ | ||
# Refer to golangci-lint's example config file for more options and information: | ||
# https://github.com/golangci/golangci-lint/blob/master/.golangci.example.yml | ||
|
||
run: | ||
timeout: 5m | ||
modules-download-mode: readonly | ||
skip-dirs: | ||
- .asdf | ||
|
||
linters: | ||
enable: | ||
- errcheck | ||
- errname | ||
- goimports | ||
- govet | ||
- prealloc | ||
- predeclared | ||
- revive | ||
- staticcheck | ||
|
||
linters-settings: | ||
revive: | ||
rules: | ||
- name: package-comments | ||
disabled: true | ||
|
||
issues: | ||
exclude-use-default: false | ||
max-issues-per-linter: 0 | ||
max-same-issues: 0 |
Oops, something went wrong.