fix: add risk column to web UI and clean up stale references #28
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| security-events: write | |
| jobs: | |
| test: | |
| name: Test | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| go-version: ['1.25'] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ matrix.go-version }} | |
| - run: make deps | |
| - run: make test | |
| - name: Generate coverage report | |
| if: matrix.go-version == '1.25' | |
| run: make test-coverage | |
| - name: Upload coverage to Codecov | |
| if: matrix.go-version == '1.25' | |
| uses: codecov/codecov-action@v3 | |
| with: | |
| files: ./coverage.out | |
| flags: unittests | |
| name: codecov-trustwatch | |
| lint: | |
| name: Lint | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: v2.8.0 | |
| args: --timeout=5m | |
| only-new-issues: true | |
| - run: make fmt | |
| - run: git diff --exit-code | |
| build: | |
| name: Build | |
| runs-on: ubuntu-latest | |
| needs: [test] | |
| strategy: | |
| matrix: | |
| include: | |
| - os: linux | |
| arch: amd64 | |
| - os: linux | |
| arch: arm64 | |
| - os: darwin | |
| arch: amd64 | |
| - os: darwin | |
| arch: arm64 | |
| - os: windows | |
| arch: amd64 | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Build binary | |
| run: | | |
| GOOS=${{ matrix.os }} GOARCH=${{ matrix.arch }} make build | |
| if [ "${{ matrix.os }}" = "windows" ]; then | |
| mv bin/trustwatch bin/trustwatch-${{ matrix.os }}-${{ matrix.arch }}.exe | |
| else | |
| mv bin/trustwatch bin/trustwatch-${{ matrix.os }}-${{ matrix.arch }} | |
| fi | |
| - uses: actions/upload-artifact@v4 | |
| with: | |
| name: trustwatch-${{ matrix.os }}-${{ matrix.arch }} | |
| path: bin/trustwatch-* | |
| retention-days: 7 | |
| security: | |
| name: Security Scan | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Run Trivy vulnerability scanner | |
| uses: aquasecurity/trivy-action@master | |
| with: | |
| scan-type: fs | |
| scan-ref: . | |
| format: sarif | |
| output: trivy-results.sarif | |
| - name: Upload Trivy results to GitHub Security | |
| uses: github/codeql-action/upload-sarif@v4 | |
| if: always() | |
| with: | |
| sarif_file: trivy-results.sarif |