diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d503a81 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,35 @@ +name: Test + +on: + pull_request: + push: + branches: + - main + +env: + GOVERSION: 1.21.5 + +jobs: + lint: + runs-on: ubuntu-latest + permissions: + id-token: write + contents: read + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: ${{ env.GOVERSION }} + - uses: golangci/golangci-lint-action@v3 + with: + version: v1.54.2 + args: --timeout 4m + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: ${{ env.GOVERSION }} + - run: go test -cover ./... diff --git a/README.md b/README.md index afc7207..80e4e8e 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,8 @@ +[![Build](https://github.com/stealthrocket/netjail/actions/workflows/build.yml/badge.svg)](https://github.com/stealthrocket/netjail/actions/workflows/build.yml) +[![Go Report Card](https://goreportcard.com/badge/github.com/stealthrocket/netjail)](https://goreportcard.com/report/github.com/stealthrocket/netjail) +[![Go Reference](https://pkg.go.dev/badge/github.com/stealthrocket/netjail.svg)](https://pkg.go.dev/github.com/stealthrocket/netjail) +[![MIT License](https://img.shields.io/badge/license-MIT-blue.svg)](LICENSE) + # netjail Go library providing network access controls for dial functions and http transports