Fix: encrypt stuff #11
Workflow file for this run
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: [master, dev] | |
| pull_request: | |
| branches: [master, dev] | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: golangci-lint | |
| uses: golangci/golangci-lint-action@v7 | |
| with: | |
| version: latest | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Run Tests | |
| run: go test -race -coverprofile=coverage.out ./... | |
| - name: Check Coverage | |
| run: | | |
| echo "=== Overall coverage ===" | |
| TOTAL=$(go tool cover -func=coverage.out | grep '^total:' | awk '{print $3}') | |
| echo "Total: ${TOTAL}" | |
| NUM=$(echo "$TOTAL" | sed 's/%//') | |
| if [ "$(echo "$NUM < 80" | bc -l)" -eq 1 ]; then | |
| echo "FAIL: Total coverage ${TOTAL} is below 80%" | |
| exit 1 | |
| fi | |
| echo "PASS: Total coverage ${TOTAL} meets 80% threshold" | |
| vet: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: '1.25' | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Vulnerability Check | |
| run: | | |
| go install golang.org/x/vuln/cmd/govulncheck@latest | |
| govulncheck ./... |