diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..a4ba810 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,54 @@ +name: "CI" + +on: + push: + branches: + - main + pull_request: + branches: + - main + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + + - name: Install dependencies + run: go mod download + + - name: Generate + run: go generate ./... + + - name: Build + run: go build -v ./... + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + + - name: Install dependencies + run: go mod download + + - name: Test + run: go test -v -race ./... + + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-go@v5 + with: + go-version-file: ./go.mod + + - name: Lint + uses: golangci/golangci-lint-action@v6 + with: + version: v1.59.1