diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml index 62451f4..41ffdd7 100644 --- a/.github/workflows/release.yaml +++ b/.github/workflows/release.yaml @@ -20,7 +20,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.18.0' # The Go version to download (if necessary) and use. + go-version: '1.21.0' # The Go version to download (if necessary) and use. - name: Run GoReleaser uses: goreleaser/goreleaser-action@v4 diff --git a/.github/workflows/workflow.yaml b/.github/workflows/workflow.yaml index 2799f57..0e3d115 100644 --- a/.github/workflows/workflow.yaml +++ b/.github/workflows/workflow.yaml @@ -28,7 +28,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v4 with: - go-version: '1.18.0' # The Go version to download (if necessary) and use. + go-version: '1.21.0' # The Go version to download (if necessary) and use. # Install all the dependencies - name: Install dependencies @@ -49,4 +49,19 @@ jobs: # Run testing on the code - name: Run testing - run: cd cmd && go test -v \ No newline at end of file + run: go test ./... -v + + # Run the racing condition testing on the code + - name: Check Racing condition + run: go test -race ./... -v + + # Run testing coverage on the code + - name: Run testing + run: go test -coverprofile=coverage.out + + # Artifact + - name: Archive code coverage results + uses: actions/upload-artifact@v3 + with: + name: code-coverage-report + path: ./coverage.out \ No newline at end of file diff --git a/go.mod b/go.mod index d1693de..e0842e6 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/ha36d/vault-utils -go 1.18 +go 1.21 require github.com/spf13/viper v1.15.0