diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 55831ff..0f5573f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -63,6 +63,22 @@ jobs: steps: - uses: actions/checkout@v6 - uses: jdx/mise-action@v4 + - name: Resolve Go cache + id: go-cache + run: | + echo "build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" + echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" + echo "version=$(go env GOVERSION)" >> "$GITHUB_OUTPUT" + - name: Restore Go and linter caches + uses: actions/cache@v6 + with: + path: | + ${{ steps.go-cache.outputs.build }} + ${{ steps.go-cache.outputs.modules }} + ~/.cache/golangci-lint + key: quality-go-${{ runner.os }}-${{ runner.arch }}-${{ steps.go-cache.outputs.version }}-${{ hashFiles('go.work', 'go.work.sum', '**/go.mod', '**/go.sum', '.golangci.yml') }} + restore-keys: | + quality-go-${{ runner.os }}-${{ runner.arch }}-${{ steps.go-cache.outputs.version }}- - name: Lint run: mise run lint - name: Check generated code @@ -76,9 +92,28 @@ jobs: needs: changes if: inputs.run_postgres_integration || needs.changes.outputs.postgres == 'true' runs-on: ubuntu-latest + env: + MISE_TASK_RUN_AUTO_INSTALL: "false" steps: - uses: actions/checkout@v6 - uses: jdx/mise-action@v4 + with: + install_args: go + - name: Resolve Go cache + id: go-cache + run: | + echo "build=$(go env GOCACHE)" >> "$GITHUB_OUTPUT" + echo "modules=$(go env GOMODCACHE)" >> "$GITHUB_OUTPUT" + echo "version=$(go env GOVERSION)" >> "$GITHUB_OUTPUT" + - name: Restore Go caches + uses: actions/cache@v6 + with: + path: | + ${{ steps.go-cache.outputs.build }} + ${{ steps.go-cache.outputs.modules }} + key: postgres-go-${{ runner.os }}-${{ runner.arch }}-${{ steps.go-cache.outputs.version }}-${{ hashFiles('go.work', 'go.work.sum', '**/go.mod', '**/go.sum') }} + restore-keys: | + postgres-go-${{ runner.os }}-${{ runner.arch }}-${{ steps.go-cache.outputs.version }}- - name: Run PostgreSQL integration tests run: mise run postgresdb:test-integration diff --git a/.github/workflows/preview-release.yml b/.github/workflows/preview-release.yml index f01abd6..167c736 100644 --- a/.github/workflows/preview-release.yml +++ b/.github/workflows/preview-release.yml @@ -11,7 +11,7 @@ on: bump: description: Stable semantic-version increment. required: true - default: patch + default: minor type: choice options: [patch, minor, major] diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index fffe397..5f00003 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,12 +11,13 @@ on: bump: description: Stable semantic-version increment. required: true - default: patch + default: minor type: choice options: [patch, minor, major] permissions: contents: write + pull-requests: read concurrency: group: release-${{ inputs.module }}