docs(readme): update "Quick testing" section #92
This file contains hidden or 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
| name: Lint and Build | |
| on: | |
| push: | |
| tags-ignore: | |
| - '*' | |
| branches: | |
| - '*' | |
| pull_request: | |
| branches: ['main', 'master'] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
| - name: Run golangci-lint | |
| uses: reviewdog/action-golangci-lint@f9bba13753278f6a73b27a56a3ffb1bfda90ed71 # v2 | |
| with: | |
| go_version: "1.25.4" | |
| fail_level: "none" | |
| build: | |
| runs-on: ubuntu-latest | |
| needs: lint | |
| steps: | |
| - name: Checkout source code | |
| uses: actions/checkout@f43a0e5ff2bd294095638e18286ca9a3d1956744 # v3 | |
| - name: Setup Go | |
| uses: actions/setup-go@be3c94b385c4f180051c996d336f57a34c397495 # v3 | |
| with: | |
| go-version: '1.25.4' | |
| - name: Install dependencies | |
| run: go get ./... | |
| - name: Test | |
| run: go test -v ./... --race | |
| - name: E2E Test | |
| env: | |
| KIND_E2E_TESTS: yes | |
| run: go test -timeout 20m -v ./e2e/... | |
| - name: Build | |
| run: go build -v ./... | |
| - name: Build Container | |
| run: go build -v ./... | |
| - name: Build an image from Dockerfile | |
| run: | | |
| docker build -t controlplane/netassert:${{ github.sha }} . | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| image-ref: 'controlplane/netassert:${{ github.sha }}' | |
| format: 'table' | |
| ignore-unfixed: true | |
| exit-code: '1' | |
| vuln-type: 'os,library' | |
| severity: 'CRITICAL,HIGH,MEDIUM' |