From 2ad0582a200820a1a019594683d0f7983c5cd0fc Mon Sep 17 00:00:00 2001 From: Jabar Asadi Date: Fri, 12 Apr 2024 22:23:36 +0200 Subject: [PATCH] Create go.yml --- .github/workflows/go.yml | 28 ++++++++++++++++++++++++++++ go.mod | 6 ++++-- 2 files changed, 32 insertions(+), 2 deletions(-) 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..925866c --- /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.20' + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/go.mod b/go.mod index 5dbf6af..99a3115 100644 --- a/go.mod +++ b/go.mod @@ -2,13 +2,15 @@ module github.com/azhovan/durable-resume go 1.22 -require github.com/stretchr/testify v1.8.4 +require ( + github.com/spf13/cobra v1.8.0 + github.com/stretchr/testify v1.8.4 +) require ( github.com/davecgh/go-spew v1.1.1 // indirect github.com/inconshreveable/mousetrap v1.1.0 // indirect github.com/pmezard/go-difflib v1.0.0 // indirect - github.com/spf13/cobra v1.8.0 // indirect github.com/spf13/pflag v1.0.5 // indirect gopkg.in/yaml.v3 v3.0.1 // indirect )