-
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
Showing
14 changed files
with
2,376 additions
and
2 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,8 @@ | ||
# /name - apply (* doesn't match /) to file "name" beginning in project root | ||
# na/me - apply (* doesn't match /) to file "na/me" anywhere | ||
# name - apply (* do match /) to file "name" anywhere | ||
# name/** - apply … to dir … | ||
# **/name - apply (* doesn't match /) to file "name" in any dir including project root | ||
# na/**/me - apply (* doesn't match /) to file "na/me", "na/*/me", "na/*/*/me", … | ||
go.sum binary | ||
*.*.go binary |
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 @@ | ||
module.exports = { | ||
extends: ['@commitlint/config-conventional'], | ||
}; |
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 @@ | ||
version: 2 | ||
updates: | ||
- package-ecosystem: 'github-actions' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
commit-message: | ||
prefix: 'chore(ci):' | ||
- package-ecosystem: 'gomod' | ||
directory: '/' | ||
schedule: | ||
interval: 'daily' | ||
commit-message: | ||
prefix: 'chore(deps):' | ||
open-pull-requests-limit: 10 |
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,62 @@ | ||
name: CI/CD | ||
|
||
on: | ||
push: | ||
branches: master | ||
tags: v* | ||
pull_request: | ||
branches: master | ||
schedule: | ||
- cron: '0 12 * * 6' | ||
|
||
jobs: | ||
|
||
test: | ||
runs-on: 'ubuntu-latest' | ||
timeout-minutes: 30 | ||
strategy: | ||
matrix: | ||
go: | ||
- '^1.20' # Also used for goveralls. | ||
- 'tip' | ||
|
||
steps: | ||
- uses: actions/setup-go@v3 | ||
if: matrix.go != 'tip' | ||
with: | ||
go-version: ${{ matrix.go }} | ||
|
||
- name: Install Go tip | ||
if: matrix.go == 'tip' | ||
run: | | ||
mkdir "$HOME/gotip" | ||
curl -sL https://storage.googleapis.com/go-build-snap/go/linux-amd64/$(git ls-remote https://github.com/golang/go.git HEAD | awk '{print $1}').tar.gz -o - | tar -C "$HOME/gotip" -xzf - | ||
echo "GOROOT=$HOME/gotip" >> $GITHUB_ENV | ||
echo "$HOME/gotip/bin" >> $GITHUB_PATH | ||
- run: go version | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v3 | ||
with: | ||
path: | | ||
~/go/bin | ||
~/go/pkg | ||
~/go/src | ||
~/.cache/go-build | ||
~/.cache/golangci-lint | ||
.buildcache | ||
key: v4-test-${{ runner.os }}-${{ hashFiles('go.mod') }}-${{ hashFiles('tools.go') }} | ||
restore-keys: | | ||
v4-test-${{ runner.os }}- | ||
- run: go generate | ||
- run: .buildcache/bin/golangci-lint run | ||
- run: go test -race ./... | ||
|
||
- name: Report code coverage | ||
env: | ||
COVERALLS_TOKEN: ${{ secrets.COVERALLS_TOKEN }} | ||
if: env.COVERALLS_TOKEN && matrix.go == '^1.20' | ||
run: .buildcache/bin/goveralls -service=GitHub |
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,31 @@ | ||
name: Create GitHub Release | ||
|
||
on: | ||
push: | ||
tags: v* | ||
|
||
jobs: | ||
|
||
create-release: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v3 | ||
|
||
- name: Generate changelog | ||
id: changelog | ||
uses: metcalfc/changelog-generator@v3.0.0 | ||
with: | ||
myToken: ${{ secrets.GITHUB_TOKEN }} | ||
|
||
- name: Create Release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
body: ${{ steps.changelog.outputs.changelog }} | ||
draft: false | ||
prerelease: false |
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: Lint PR name | ||
|
||
on: | ||
pull_request: | ||
branches: master | ||
types: [ opened, edited, synchronize, reopened ] | ||
|
||
jobs: | ||
|
||
lint-PR-name: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- name: Install Dependencies | ||
run: npm install @commitlint/config-conventional | ||
|
||
- uses: JulienKode/pull-request-name-linter-action@v0.5.0 | ||
with: | ||
configuration-path: '.github/commitlint.config.js' |
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: Update Go module doc | ||
|
||
on: | ||
push: | ||
tags: v* | ||
|
||
jobs: | ||
|
||
update-doc: | ||
runs-on: ubuntu-latest | ||
timeout-minutes: 3 | ||
steps: | ||
- name: Pull new module version | ||
uses: andrewslotin/go-proxy-pull-action@master |
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,62 @@ | ||
name: "CodeQL" | ||
|
||
on: | ||
push: | ||
branches: [master] | ||
#pull_request: | ||
# The branches below must be a subset of the branches above | ||
#branches: [master] | ||
schedule: | ||
- cron: '0 12 * * 5' | ||
|
||
jobs: | ||
analyze: | ||
name: Analyze | ||
runs-on: ubuntu-latest | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
# Override automatic language detection by changing the below list | ||
# Supported options are ['csharp', 'cpp', 'go', 'java', 'javascript', 'python'] | ||
language: ['go'] | ||
# Learn more... | ||
# https://docs.github.com/en/github/finding-security-vulnerabilities-and-errors-in-your-code/configuring-code-scanning#overriding-automatic-language-detection | ||
|
||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
with: | ||
# We must fetch at least the immediate parents so that if this is | ||
# a pull request then we can checkout the head. | ||
fetch-depth: 2 | ||
|
||
# If this run was triggered by a pull request event, then checkout | ||
# the head of the pull request instead of the merge commit. | ||
- run: git checkout HEAD^2 | ||
if: ${{ github.event_name == 'pull_request' }} | ||
|
||
# Initializes the CodeQL tools for scanning. | ||
- name: Initialize CodeQL | ||
uses: github/codeql-action/init@v2 | ||
with: | ||
languages: ${{ matrix.language }} | ||
|
||
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java). | ||
# If this step fails, then you should remove it and run the build manually (see below) | ||
- name: Autobuild | ||
uses: github/codeql-action/autobuild@v2 | ||
|
||
# ℹ️ Command-line programs to run using the OS shell. | ||
# 📚 https://git.io/JvXDl | ||
|
||
# ✏️ If the Autobuild fails above, remove it and uncomment the following three lines | ||
# and modify them (or add more) to build your code if your project | ||
# uses a compiled language | ||
|
||
#- run: | | ||
# make bootstrap | ||
# make release | ||
|
||
- name: Perform CodeQL Analysis | ||
uses: github/codeql-action/analyze@v2 |
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,9 @@ | ||
# /name - exclude path (* doesn't match /) to file/dir "name" beginning in project root | ||
# na/me - exclude path (* doesn't match /) to file/dir "na/me" anywhere | ||
# name - exclude path (* do match /) to file/dir "name" anywhere | ||
# name/ - exclude path … to dir … | ||
# **/name - exclude path (* doesn't match /) to file/dir "name" in any dir including project root | ||
# na/**/me - exclude path (* doesn't match /) to file/dir "na/me", "na/*/me", "na/*/*/me", … | ||
# !name - include previously excluded path … | ||
/.buildcache/ | ||
/cover.out |
Oops, something went wrong.