Init: Vibe coding take over #4
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: | | |
| go tool cover -func=coverage.out | |
| # Fail if any package has less than 80% coverage | |
| go tool cover -func=coverage.out | grep -E '^github.com/Driver-C/tryssh/' | awk '{print $3}' | while read pct; do | |
| num=$(echo "$pct" | sed 's/%//') | |
| if [ "$(echo "$num < 80" | bc -l)" -eq 1 ]; then | |
| echo "Coverage $pct is below 80%" | |
| exit 1 | |
| fi | |
| done | |
| 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 ./... |