From d4601b7c2f8c4a4c0e6ee0a25b8bd782e620459f Mon Sep 17 00:00:00 2001 From: ikura-hamu <104292023+ikura-hamu@users.noreply.github.com> Date: Tue, 30 Jul 2024 00:35:36 +0900 Subject: [PATCH] :wrench: CI --- .github/workflows/ci.yml | 54 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 54 insertions(+) create mode 100644 .github/workflows/ci.yml 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