Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .dockerignore
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ __pycache__/
*.py[cod]
*$py.class
.pytest_cache/
..mypy_cache/
.mypy_cache/

# Test binary, build with `go test -c`
*.test
Expand Down
7 changes: 5 additions & 2 deletions .github/.env.base
Original file line number Diff line number Diff line change
Expand Up @@ -238,7 +238,7 @@ MAGE_X_AUTO_DISCOVER_BUILD_TAGS_EXCLUDE=race,custom # Comma-separated
MAGE_X_FORMAT_EXCLUDE_PATHS=vendor,node_modules,.git,.idea # Format exclusion paths (comma-separated directories to exclude from formatting)
MAGE_X_GITLEAKS_VERSION=8.28.0 # https://github.com/gitleaks/gitleaks/releases
MAGE_X_GOFUMPT_VERSION=v0.9.1 # https://github.com/mvdan/gofumpt/releases
MAGE_X_GOLANGCI_LINT_VERSION=v2.5.0 # https://github.com/golangci/golangci-lint/releases
MAGE_X_GOLANGCI_LINT_VERSION=v2.6.0 # https://github.com/golangci/golangci-lint/releases
MAGE_X_GORELEASER_VERSION=v2.12.7 # https://github.com/goreleaser/goreleaser/releases
MAGE_X_GOVULNCHECK_VERSION=v1.1.4 # https://pkg.go.dev/golang.org/x/vuln
MAGE_X_GO_SECONDARY_VERSION=1.24.x # Secondary Go version for MAGE-X (also our secondary)
Expand All @@ -256,6 +256,9 @@ MAGE_X_YAMLFMT_VERSION=v0.17.2 # https://github.c

# Optional Overrides (use .env.custom to override these defaults)
# MAGE_X_BINARY_NAME=magex
# MAGE_X_BUILD_BATCH_DELAY_MS=200
# MAGE_X_BUILD_BATCH_SIZE=2
# MAGE_X_BUILD_STRATEGY=incremental
# MAGE_X_BUILD_TAGS=mage
# MAGE_X_DOWNLOAD_BACKOFF=2.0
# MAGE_X_DOWNLOAD_INITIAL_DELAY=300
Expand Down Expand Up @@ -315,7 +318,7 @@ GO_PRE_COMMIT_MAX_FILES_OPEN=100
GO_PRE_COMMIT_ALL_FILES=true

# Tool Versions
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.5.0 # https://github.com/golangci/golangci-lint
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.6.0 # https://github.com/golangci/golangci-lint
GO_PRE_COMMIT_FUMPT_VERSION=v0.9.1 # https://github.com/mvdan/gofumpt
GO_PRE_COMMIT_GOIMPORTS_VERSION=latest # https://github.com/golang/tools

Expand Down
2 changes: 1 addition & 1 deletion .github/tech-conventions/pre-commit.md
Original file line number Diff line number Diff line change
Expand Up @@ -392,7 +392,7 @@ go-pre-commit install
go install github.com/mrz1836/go-pre-commit/cmd/go-pre-commit@latest
# Update tool versions in .env.base
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.5.0
GO_PRE_COMMIT_GOLANGCI_LINT_VERSION=v2.6.0
GO_PRE_COMMIT_FUMPT_VERSION=v0.9.0
```

Expand Down
10 changes: 9 additions & 1 deletion .github/workflows/fortress-code-quality.yml
Original file line number Diff line number Diff line change
Expand Up @@ -263,6 +263,14 @@ jobs:
runner-os: ${{ inputs.primary-runner }}
use-local: ${{ env.MAGE_X_USE_LOCAL }}

# --------------------------------------------------------------------
# Capture golangci-lint version for outputs and reporting
# --------------------------------------------------------------------
- name: 🔍 Capture golangci-lint version
id: golangci-lint-version
run: |
echo "version=${{ env.MAGE_X_GOLANGCI_LINT_VERSION }}" >> $GITHUB_OUTPUT

# --------------------------------------------------------------------
# Restore Cache golangci-lint
# --------------------------------------------------------------------
Expand All @@ -271,7 +279,7 @@ jobs:
uses: actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4.3.0
with:
path: ${{ env.GOLANGCI_LINT_CACHE }}
key: ${{ inputs.primary-runner }}-golangci-lint-analysis-${{ hashFiles('.golangci.json', env.GO_SUM_FILE) }}
key: ${{ inputs.primary-runner }}-golangci-lint-analysis-${{ hashFiles('.golangci.json', env.GO_SUM_FILE) }}-${{ steps.golangci-lint-version.outputs.version }}

- name: 🔍 Debug cache usage
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/fortress-security-scans.yml
Original file line number Diff line number Diff line change
Expand Up @@ -245,7 +245,7 @@ jobs:
with:
path: |
~/.cache/govulncheck-bin
key: ${{ inputs.primary-runner }}-govulncheck-${{ env.GOVULNCHECK_VERSION }}
key: ${{ inputs.primary-runner }}-govulncheck-${{ env.GOVULNCHECK_VERSION }}-go${{ env.GOVULNCHECK_GO_VERSION }}

- name: 🛠️ Make cached govulncheck usable
run: |
Expand Down
25 changes: 15 additions & 10 deletions .github/workflows/fortress.yml
Original file line number Diff line number Diff line change
Expand Up @@ -149,8 +149,9 @@ jobs:
needs: [load-env, setup, test-magex, warm-cache]
if: |
!cancelled() &&
needs.warm-cache.result != 'failure' &&
needs.warm-cache.result != 'cancelled' &&
needs.setup.result == 'success' &&
needs.test-magex.result == 'success' &&
(needs.warm-cache.result == 'success' || needs.warm-cache.result == 'skipped') &&
needs.setup.outputs.security-scans-enabled == 'true'
permissions:
contents: read # Read repository content for security scanning
Expand All @@ -176,8 +177,9 @@ jobs:
needs: [load-env, setup, test-magex, warm-cache]
if: |
!cancelled() &&
needs.warm-cache.result != 'failure' &&
needs.warm-cache.result != 'cancelled'
needs.setup.result == 'success' &&
needs.test-magex.result == 'success' &&
(needs.warm-cache.result == 'success' || needs.warm-cache.result == 'skipped')
permissions:
contents: read # Read repository content for code quality checks
uses: ./.github/workflows/fortress-code-quality.yml
Expand All @@ -199,8 +201,9 @@ jobs:
needs: [load-env, setup, test-magex, warm-cache]
if: |
!cancelled() &&
needs.warm-cache.result != 'failure' &&
needs.warm-cache.result != 'cancelled' &&
needs.setup.result == 'success' &&
needs.test-magex.result == 'success' &&
(needs.warm-cache.result == 'success' || needs.warm-cache.result == 'skipped') &&
needs.setup.outputs.pre-commit-enabled == 'true'
permissions:
contents: read # Read repository content for pre-commit checks
Expand All @@ -219,8 +222,9 @@ jobs:
needs: [load-env, setup, test-magex, warm-cache]
if: |
!cancelled() &&
needs.warm-cache.result != 'failure' &&
needs.warm-cache.result != 'cancelled'
needs.setup.result == 'success' &&
needs.test-magex.result == 'success' &&
(needs.warm-cache.result == 'success' || needs.warm-cache.result == 'skipped')
permissions:
contents: write # Write repository content and push to gh-pages branch for test execution
pull-requests: write # Required: Coverage workflow needs to create PR comments
Expand Down Expand Up @@ -259,8 +263,9 @@ jobs:
needs: [load-env, setup, test-magex, warm-cache]
if: |
!cancelled() &&
needs.warm-cache.result != 'failure' &&
needs.warm-cache.result != 'cancelled' &&
needs.setup.result == 'success' &&
needs.test-magex.result == 'success' &&
(needs.warm-cache.result == 'success' || needs.warm-cache.result == 'skipped') &&
needs.setup.outputs.benchmarks-enabled == 'true'
permissions:
contents: read # Read repository content for benchmarking
Expand Down