feat: v0.1.0 release #17
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: | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ci-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup environment | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y gettext plasma-sdk bc | |
| shell: bash | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.x | |
| - name: Cache Go modules | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/go/pkg/mod | |
| ~/.cache/go-build | |
| key: ${{ runner.os }}-go-${{ hashFiles('**/go.sum') }} | |
| restore-keys: | | |
| ${{ runner.os }}-go- | |
| - name: Install Go deps | |
| run: go mod download | |
| - name: Vet | |
| run: go vet ./... | |
| - name: Run tests | |
| run: go test ./cmd/... ./internal/... ./utils/... -v -race -coverprofile=coverage.out -covermode=atomic | |
| - name: Check coverage | |
| run: | | |
| total=$(go tool cover -func=coverage.out | awk '/^total:/ {print $3}' | sed 's/%//') | |
| echo "Total coverage: $total%" | |
| min=80 | |
| if (( $(echo "$total < $min" | bc -l) )); then | |
| echo "Coverage is below $min%" | |
| exit 1 | |
| fi | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v4 | |
| - name: Setup Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: 1.24.x | |
| - name: Golangci-lint | |
| uses: golangci/golangci-lint-action@v6 | |
| with: | |
| version: latest | |
| args: --timeout=5m |