From d2e845372b9bd8718c4032ea4e85e0c803f44309 Mon Sep 17 00:00:00 2001 From: breadrock Date: Tue, 28 May 2024 15:58:36 +0300 Subject: [PATCH] chore(actions): added github actions config file --- .github/workflows/go.yml | 56 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 56 insertions(+) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 0000000..89e95b6 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,56 @@ +name: Github Actions + +on: + push: + branches: + - master + +jobs: + build: + runs-on: ubuntu-latest + steps: + - name: Set up Golang + uses: actions/setup-go@v3 + with: + go-version: ~1.19 + + - name: Check out code + uses: actions/checkout@v3 + + - name: Build binary + run: make build + working-directory: . + + tests: + runs-on: ubuntu-latest + needs: [build] + steps: + - name: Set up Golang + uses: actions/setup-go@v3 + with: + go-version: ^1.19 + + - name: Check out code + uses: actions/checkout@v3 + + - name: Unit tests + run: go test -v -count=1 -race -timeout=1m ./... + working-directory: . + + lint: + runs-on: ubuntu-latest + needs: [build] + steps: + - name: Set up Golang + uses: actions/setup-go@v3 + with: + go-version: ~1.19 + + - name: Check out code + uses: actions/checkout@v3 + + - name: Linters + uses: golangci/golangci-lint-action@v3 + with: + version: v1.50.1 + working-directory: . \ No newline at end of file