omissis/go-jsonschema

View on GitHub
.github/workflows/development.yaml

Summary

Maintainability
Test Coverage
---
name: development
on:
  push:
    branches:
      - main
  pull_request:
permissions:
  contents: read
  pull-requests: read
concurrency:
  group: ${{ github.workflow }} @ ${{ github.event.pull_request.head.label || github.head_ref || github.ref }}
  cancel-in-progress: true
jobs:
  qa:
    runs-on: ubuntu-22.04
    steps:
      - name: Checkout
        uses: actions/checkout@a5ac7e51b41094c92402da3b24376905380afc29 # v4
      - name: Setup Golang
        uses: actions/setup-go@v5
        with:
          go-version: ^1.22.2
      - name: Setup workspace
        run: cp go.work.dist go.work
      - name: Download golangci-lint installer
        run: curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh -o /tmp/install-golangci-lint.sh
      - name: Install golangci-lint
        run: sh /tmp/install-golangci-lint.sh -b /usr/local/bin v1.57.2
      - name: Lint Go files
        run: ./scripts/lint-golang.sh
      - name: Run tests
        run: ./scripts/test.sh
      - name: Upload coverage to Codecov
        uses: codecov/codecov-action@v4
      - name: Build binaries
        uses: goreleaser/goreleaser-action@v5
        with:
          distribution: goreleaser
          version: 1.25.1
          args: release --debug --snapshot --clean
        env:
          GO_VERSION: 1.22.2