From e1cb779c2b600d12ab742fee775a9a2d6d438189 Mon Sep 17 00:00:00 2001 From: Andrei Pavlov Date: Wed, 22 May 2024 14:22:20 +0700 Subject: [PATCH] Add CI job Signed-off-by: Andrei Pavlov --- .github/workflows/test.yml | 51 ++++++++++++++++++++++++++++++++++++++ 1 file changed, 51 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 000000000..78c7d1ec8 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,51 @@ +name: Build and Test + +on: + push: + branches: + - main + - release-* + tags: + - "*" + paths-ignore: + - 'config/**' + - '**.md' + pull_request: + branches: + - main + - release-* + tags: + - "*" + paths-ignore: + - 'config/**' + - '**.md' + +env: + GO_VERSION: '1.22' + +jobs: + build: + name: Build + runs-on: ubuntu-latest + steps: + - name: Checkout repository + uses: actions/checkout@v4 + - name: Set up Go + uses: actions/setup-go@v5 + with: + go-version: ${{ env.GO_VERSION }} + - name: Check go mod + run: go mod tidy && git diff --exit-code + - name: Lint + uses: golangci/golangci-lint-action@v6 + with: + args: --timeout 10m0s + - name: Unit tests + run: | + make test + - name: Build + run: | + make build + - name: Image build + run: | + make docker-build