From 1809057cffd1eea53ffa69f67c8323fcaa1e219a Mon Sep 17 00:00:00 2001 From: utibeabasi6 Date: Sat, 3 Feb 2024 05:51:25 +0100 Subject: [PATCH] feat(ci): add build and lint workflow --- .github/workflows/build-cli.yaml | 36 ++++++++++++++++++++++++++++++++ 1 file changed, 36 insertions(+) create mode 100644 .github/workflows/build-cli.yaml diff --git a/.github/workflows/build-cli.yaml b/.github/workflows/build-cli.yaml new file mode 100644 index 0000000..a9b0c0d --- /dev/null +++ b/.github/workflows/build-cli.yaml @@ -0,0 +1,36 @@ +name: Build and Lint CLI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Setup Go + uses: actions/setup-go@v2 + with: + go-version: '1.21.5' # The Go version to download (if necessary) and use. + + - name: Install dependencies + run: | + go version + go mod tidy + + - name: Run build + run: go build . + + - name: Run vet + run: | + go vet . + - name: golangci-lint + uses: golangci/golangci-lint-action@v3 + with: + version: v1.54