From b174a8d167a586422e87ff3c2aab1ef7ac0da9af Mon Sep 17 00:00:00 2001 From: Alex Borodin Date: Fri, 10 Nov 2023 18:03:15 +0100 Subject: [PATCH] Create GitHub workflow go.yml --- .github/workflows/go.yml | 28 ++++++++++++++++++++++++++++ go.mod | 2 +- 2 files changed, 29 insertions(+), 1 deletion(-) create mode 100644 .github/workflows/go.yml diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml new file mode 100644 index 00000000..4927f098 --- /dev/null +++ b/.github/workflows/go.yml @@ -0,0 +1,28 @@ +# This workflow will build a golang project +# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-go + +name: Go + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.21' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/go.mod b/go.mod index 02f85f3b..42233385 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/web-of-things-open-source/tm-catalog-cli -go 1.21.3 +go 1.21 require ( github.com/Masterminds/semver/v3 v3.2.1