51 lines
1 KiB
YAML
51 lines
1 KiB
YAML
name: Go Unit Test
|
|
|
|
on:
|
|
push:
|
|
branches: [ master ]
|
|
pull_request:
|
|
types: [assigned, opened, synchronize, reopened]
|
|
release:
|
|
types: [ released ]
|
|
|
|
jobs:
|
|
|
|
build:
|
|
name: Build
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
|
|
- name: Set up Go 1.x
|
|
uses: actions/setup-go@v3
|
|
with:
|
|
go-version: ^1.18
|
|
id: go
|
|
|
|
- name: Check out code into the Go module directory
|
|
uses: actions/checkout@v3
|
|
with:
|
|
fetch-depth: 0
|
|
submodules: 'recursive'
|
|
|
|
|
|
- uses: dotnet/nbgv@master
|
|
with:
|
|
setAllVars: true
|
|
|
|
- name: golangci-lint
|
|
uses: golangci/golangci-lint-action@v3
|
|
with:
|
|
args: --timeout=60m -E gofmt --verbose
|
|
|
|
- name: Test lib ssh
|
|
run: go test -v -cover ./...
|
|
working-directory: crypto/ssh
|
|
|
|
- name: Test sshpiper
|
|
run: go test -v -race -cover ./...
|
|
|
|
- name: create release
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
run: |
|
|
gh release create -d --generate-notes v$NBGV_SimpleVersion
|