From 3931db04a903b74e246fe103d90dd73c994c1cb2 Mon Sep 17 00:00:00 2001 From: Yan Karpov Date: Mon, 8 May 2023 19:02:04 +0300 Subject: [PATCH] Added github workflows --- .github/workflows/go.yml | 43 ++++++++++++++++++++++++++++++++++++++++ .gitignore | 1 + 2 files changed, 44 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..f595cca --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,43 @@ +name: Go + +on: + push: + branches: [ main ] + pull_request: + branches: [ main ] + +jobs: + + build-and-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + + - name: Set up Go + uses: actions/setup-go@v2 + with: + go-version: 1.19 + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... + + linter: + strategy: + matrix: + go-version: [1.19.x] + os: [ubuntu-latest] + runs-on: ${{ matrix.os }} + steps: + - name: Install Go + uses: actions/setup-go@v2 + with: + go-version: ${{ matrix.go-version }} + - name: Checkout code + uses: actions/checkout@v2 + - name: Run linters + uses: golangci/golangci-lint-action@v2 + with: + version: latest diff --git a/.gitignore b/.gitignore index 2d6c2aa..104b71d 100644 --- a/.gitignore +++ b/.gitignore @@ -20,5 +20,6 @@ # Go workspace file go.work +/bin /.idea .env