|
| 1 | +name: CI (disabled temporary) |
| 2 | + |
| 3 | +on: |
| 4 | + workflow_dispatch: |
| 5 | + # Temporarily disable automatic triggers while issues are fixed |
| 6 | + push: |
| 7 | + branches-ignore: ["**"] |
| 8 | + pull_request: |
| 9 | + branches-ignore: ["**"] |
| 10 | + |
| 11 | +permissions: |
| 12 | + contents: read |
| 13 | + |
| 14 | +jobs: |
| 15 | + build: |
| 16 | + if: ${{ github.event_name == 'workflow_dispatch' }} |
| 17 | + name: ${{ matrix.os }} |
| 18 | + runs-on: ${{ matrix.os }} |
| 19 | + strategy: |
| 20 | + fail-fast: false |
| 21 | + matrix: |
| 22 | + os: [ ubuntu-latest, macos-latest, windows-latest ] |
| 23 | + |
| 24 | + steps: |
| 25 | + - name: Checkout |
| 26 | + uses: actions/checkout@v4 |
| 27 | + |
| 28 | + - name: Setup Go |
| 29 | + uses: actions/setup-go@v5 |
| 30 | + with: |
| 31 | + go-version-file: go.mod |
| 32 | + cache: true |
| 33 | + |
| 34 | + - name: Print Go version |
| 35 | + run: go version |
| 36 | + |
| 37 | + - name: Install ripgrep (Linux) |
| 38 | + if: runner.os == 'Linux' |
| 39 | + run: | |
| 40 | + sudo apt-get update |
| 41 | + sudo apt-get install -y ripgrep |
| 42 | +
|
| 43 | + - name: Install ripgrep (macOS) |
| 44 | + if: runner.os == 'macOS' |
| 45 | + run: | |
| 46 | + brew update |
| 47 | + brew install ripgrep |
| 48 | +
|
| 49 | + - name: Install make and ripgrep (Windows) |
| 50 | + if: runner.os == 'Windows' |
| 51 | + shell: bash |
| 52 | + run: | |
| 53 | + choco install -y make ripgrep |
| 54 | + echo "make version:"; make --version || true |
| 55 | + echo "rg version:"; rg --version || true |
| 56 | +
|
| 57 | + - name: Print Go env |
| 58 | + run: go env |
| 59 | + |
| 60 | + - name: Tidy |
| 61 | + shell: bash |
| 62 | + run: make tidy |
| 63 | + |
| 64 | + - name: lint (includes check-go-version) |
| 65 | + shell: bash |
| 66 | + run: | |
| 67 | + set -o pipefail |
| 68 | + make lint 2>&1 | tee lint.log |
| 69 | +
|
| 70 | + - name: Assert lint order (check-go-version before golangci-lint) |
| 71 | + shell: bash |
| 72 | + run: | |
| 73 | + test -f lint.log || { echo "lint.log missing"; exit 1; } |
| 74 | + L_CHECK=$(rg -n "^check-go-version: OK" -N lint.log | head -1 | cut -d: -f1) |
| 75 | + L_GCL=$(rg -n "^golangci-lint version" -N lint.log | head -1 | cut -d: -f1) |
| 76 | + if [ -z "$L_CHECK" ]; then echo "Missing 'check-go-version: OK' line in lint.log"; exit 1; fi |
| 77 | + if [ -z "$L_GCL" ]; then echo "Missing 'golangci-lint version' line in lint.log"; exit 1; fi |
| 78 | + if [ "$L_CHECK" -ge "$L_GCL" ]; then |
| 79 | + echo "Ordering incorrect: 'check-go-version: OK' occurs at line $L_CHECK, after golangci-lint version at line $L_GCL"; exit 1; |
| 80 | + fi |
| 81 | + echo "Lint order OK: check-go-version runs before golangci-lint" |
| 82 | +
|
| 83 | + - name: Upload lint.log artifact |
| 84 | + uses: actions/upload-artifact@v4 |
| 85 | + with: |
| 86 | + name: lint-${{ matrix.os }} |
| 87 | + path: lint.log |
| 88 | + if-no-files-found: error |
| 89 | + |
| 90 | + - name: Tools path hygiene |
| 91 | + shell: bash |
| 92 | + run: make check-tools-paths |
| 93 | + |
| 94 | + - name: Verify tools manifest commands |
| 95 | + shell: bash |
| 96 | + run: make verify-manifest-paths |
| 97 | + |
| 98 | + - name: Test |
| 99 | + shell: bash |
| 100 | + run: make test |
| 101 | + |
| 102 | + - name: Test clean-logs guard |
| 103 | + shell: bash |
| 104 | + run: make test-clean-logs |
| 105 | + |
| 106 | + - name: Build |
| 107 | + shell: bash |
| 108 | + run: make build |
| 109 | + |
| 110 | + - name: Build tools |
| 111 | + shell: bash |
| 112 | + run: make build-tools |
0 commit comments