name: Pull Request
on:
  pull_request:
    types: [opened, synchronize]

permissions:
  contents: read

jobs:
  integrate:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Setup Go
        uses: actions/setup-go@v4
        with:
          go-version-file: "go.mod"

      - name: Build and test
        run: |
          go build -v ./...
          go test -v ./...

      - name: Lint
        uses: golangci/golangci-lint-action@v3
        with:
          version: v1.52.2
