-
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
0 parents
commit 9310ae8
Showing
68 changed files
with
7,249 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,53 @@ | ||
name: CI | ||
|
||
on: | ||
pull_request: | ||
push: | ||
branches: | ||
- main | ||
|
||
env: | ||
GO_VERSION: '^1.18.3' | ||
|
||
jobs: | ||
license-check: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: License check | ||
run: | | ||
make license_check | ||
lint: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Lint | ||
run: | | ||
make lint | ||
test: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Tests + coverage | ||
run: | | ||
make coverage | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: ${{ env.GO_VERSION }} | ||
- name: Build (all platforms) | ||
run: | | ||
make build_all_platforms |
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,70 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- 'v*' | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-20.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/setup-go@v3 | ||
with: | ||
go-version: '^1.18.3' | ||
|
||
- name: Build for all platforms | ||
run: | | ||
make build_all_platforms | ||
- name: Upload build artifacts | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: pasuman-build-artifacts | ||
path: pasuman-* | ||
|
||
create_release: | ||
runs-on: ubuntu-20.04 | ||
|
||
needs: build | ||
|
||
outputs: | ||
release_upload_url: ${{ steps.create_release.outputs.upload_url }} | ||
|
||
steps: | ||
- name: Create release | ||
id: create_release | ||
uses: actions/create-release@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
tag_name: ${{ github.ref }} | ||
release_name: ${{ github.ref }} | ||
|
||
upload_release_assets: | ||
runs-on: ubuntu-20.04 | ||
|
||
needs: create_release | ||
|
||
strategy: | ||
matrix: | ||
output: [linux-amd64, darwin-amd64, darwin-arm64] | ||
|
||
steps: | ||
- name: Download build artifacts | ||
uses: actions/download-artifact@v3 | ||
with: | ||
name: pasuman-build-artifacts | ||
|
||
- name: Upload release assets | ||
uses: actions/upload-release-asset@v1 | ||
env: | ||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | ||
with: | ||
upload_url: ${{ needs.create_release.outputs.release_upload_url }} | ||
asset_path: ./pasuman-${{ matrix.output }} | ||
asset_name: pasuman-${{ matrix.output }} | ||
asset_content_type: application/octet-stream |
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 @@ | ||
coverage.out | ||
pasuman* | ||
!pasumantest/ |
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,32 @@ | ||
# unfortunately, go 1.18 does not support all linters for now, | ||
# so we run the linter for go 1.17 | ||
# see https://github.com/golangci/golangci-lint/issues/2649 | ||
run: | ||
go: '1.17' | ||
|
||
linters: | ||
enable-all: true | ||
disable: | ||
- cyclop | ||
- exhaustruct | ||
- exhaustivestruct | ||
- forbidigo | ||
- gochecknoglobals | ||
- paralleltest | ||
- testpackage | ||
- varnamelen | ||
- wrapcheck | ||
|
||
linters-settings: | ||
tagliatelle: | ||
case: | ||
use-field-name: true | ||
rules: | ||
json: snake | ||
|
||
issues: | ||
exclude-rules: | ||
- path: _test\.go | ||
linters: | ||
- funlen | ||
|
Oops, something went wrong.