diff --git a/.github/workflows/pull-request.yml b/.github/workflows/pull-request.yml new file mode 100644 index 0000000..46976d7 --- /dev/null +++ b/.github/workflows/pull-request.yml @@ -0,0 +1,34 @@ +name: Pull Request Checks + +on: + pull_request: + branches: [ main ] + paths: + - '**/*.go' + - '.github/workflows/pull-request.yml' + +jobs: + test: + name: Run Tests + runs-on: ubuntu-latest + steps: + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.19' + check-latest: true + + - name: Check out code + uses: actions/checkout@v4 + + - name: Get dependencies + run: go mod download + + - name: Run tests + run: go test -v ./... + + - name: Run linter + uses: golangci/golangci-lint-action@v3 + with: + version: latest + args: --timeout=5m