diff --git a/.github/workflows/codeql-analysis.yml b/.github/workflows/codeql-analysis.yml index 0c2948a..8af4d0d 100644 --- a/.github/workflows/codeql-analysis.yml +++ b/.github/workflows/codeql-analysis.yml @@ -36,6 +36,13 @@ jobs: # a pull request then we can check out the head. fetch-depth: 2 + # GH Actions runner uses go1.20 by default, so we need to install our own version. + # https://github.com/github/codeql-action/issues/1842#issuecomment-1704398087 + - name: Install Go from go.mod + uses: actions/setup-go@v5 + with: + go-version-file: go.mod + # If this run was triggered by a pull request event, then checkout # the head of the pull request instead of the merge commit. - run: git checkout HEAD^2 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 8443227..82d54bb 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -23,7 +23,7 @@ jobs: - name: Set up Go uses: actions/setup-go@v5 with: - go-version: 1.19 + go-version-file: go.mod - name: Run GoReleaser uses: goreleaser/goreleaser-action@v5.0.0 with: diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml index 58d5017..7d1903d 100644 --- a/.github/workflows/run-tests.yml +++ b/.github/workflows/run-tests.yml @@ -36,16 +36,15 @@ jobs: needs: [yamllint, asknancy] strategy: matrix: - go-version: [1.18.x, 1.19.x] os: [ubuntu-latest] runs-on: ${{ matrix.os }} steps: - - name: Install Go ${{ matrix.go-version }} - uses: actions/setup-go@v5 - with: - go-version: ${{ matrix.go-version }} - name: Checkout code uses: actions/checkout@v4 + - name: Install Go from go.mod + uses: actions/setup-go@v5 + with: + go-version-file: go.mod - name: Cache code uses: actions/cache@v3 with: diff --git a/go.mod b/go.mod index 3d1551f..4e0f342 100644 --- a/go.mod +++ b/go.mod @@ -1,6 +1,6 @@ module github.com/BuxOrg/bux-models -go 1.18 +go 1.21 require github.com/stretchr/testify v1.8.4