diff --git a/.github/workflows/go.yml b/.github/workflows/go.yml index 925866c..b42b353 100644 --- a/.github/workflows/go.yml +++ b/.github/workflows/go.yml @@ -14,15 +14,30 @@ jobs: build: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v3 - - name: Set up Go - uses: actions/setup-go@v4 - with: - go-version: '1.20' + - name: Set up Go + uses: actions/setup-go@v4 + with: + go-version: '1.20' - - name: Build - run: go build -v ./... + - name: Install dependencies + run: go install golang.org/x/lint/golint@latest - - name: Test - run: go test -v ./... + - name: Add missing dependencies + run: go mod tidy + + - name: Verify dependencies + run: go mod verify + + - name: Run go vet + run: go vet ./... + + - name: Run linter + run: golint ./... + + - name: Build + run: go build -v ./... + + - name: Test + run: go test -v ./... diff --git a/.gitignore b/.gitignore index 5c34768..84e6840 100644 --- a/.gitignore +++ b/.gitignore @@ -23,7 +23,6 @@ # Dependency directories /go.sum -/go.mod # other files .env diff --git a/go.mod b/go.mod new file mode 100644 index 0000000..5aad92c --- /dev/null +++ b/go.mod @@ -0,0 +1,14 @@ +module github.com/oussamaM1/task + +go 1.22 + +require ( + github.com/joho/godotenv v1.5.1 + github.com/spf13/cobra v1.8.0 + gopkg.in/yaml.v2 v2.4.0 +) + +require ( + github.com/inconshreveable/mousetrap v1.1.0 // indirect + github.com/spf13/pflag v1.0.5 // indirect +)