From 358929d6294762a6bc211bf1a9a59c689fbc2923 Mon Sep 17 00:00:00 2001 From: Wei Fu Date: Thu, 30 Nov 2023 10:05:12 +0000 Subject: [PATCH] .github: init CI workflow Signed-off-by: Wei Fu --- .github/workflows/ci.yml | 36 ++++++++++++++++++++++++++++++++++++ 1 file changed, 36 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..555b0cd --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,36 @@ +name: CI +on: + pull_request: + branches: ['main'] +jobs: + linter: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + args: --config .golangci.yml + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: test + run: make test + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions/setup-go@v4 + with: + go-version: "1.20" + - name: build + run: make build