From 80a7f80b819d6f54979cdee588564c904fd0f51d Mon Sep 17 00:00:00 2001 From: Matthew Sevey <15232757+MSevey@users.noreply.github.com> Date: Mon, 8 Jul 2024 12:06:35 -0400 Subject: [PATCH] chore(ci): update ci to use go version from go.mod --- .github/workflows/ci_release.yml | 4 ---- .github/workflows/lint.yml | 7 +------ .github/workflows/test.yml | 11 +++-------- 3 files changed, 4 insertions(+), 18 deletions(-) diff --git a/.github/workflows/ci_release.yml b/.github/workflows/ci_release.yml index c77e336..a918873 100644 --- a/.github/workflows/ci_release.yml +++ b/.github/workflows/ci_release.yml @@ -26,13 +26,9 @@ on: jobs: lint: uses: ./.github/workflows/lint.yml - with: - GO_VERSION: "1.21" test: uses: ./.github/workflows/test.yml - with: - GO_VERSION: "1.21" # Make a release if this is a manually trigger job, i.e. workflow_dispatch release: diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index d4c4944..df10c16 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -3,11 +3,6 @@ name: lint on: workflow_call: - inputs: - GO_VERSION: - description: 'Go version to use' - type: string - required: true jobs: golangci-lint: @@ -17,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: ${{ inputs.GO_VERSION }} + go-version-file: ./go.mod # This steps sets the GIT_DIFF environment variable to true # if files defined in PATTERS changed - uses: technote-space/get-diff-action@v6.1.2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index b17192b..32e5525 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -3,11 +3,6 @@ name: Tests / Code Coverage on: workflow_call: - inputs: - GO_VERSION: - description: "Go version to use" - type: string - required: true jobs: go_mod_tidy_check: @@ -17,7 +12,7 @@ jobs: - uses: actions/checkout@v4 - uses: actions/setup-go@v4 with: - go-version: ${{ inputs.GO_VERSION }} + go-version-file: ./go.mod - run: go mod tidy - name: check for diff run: git diff --exit-code @@ -30,7 +25,7 @@ jobs: - name: set up go uses: actions/setup-go@v4 with: - go-version: ${{ inputs.GO_VERSION }} + go-version-file: ./go.mod - name: Run unit test run: make test - name: upload coverage report @@ -47,6 +42,6 @@ jobs: - name: set up go uses: actions/setup-go@v4 with: - go-version: ${{ inputs.GO_VERSION }} + go-version-file: ./go.mod - name: Integration Tests run: echo "No integration tests yet"