feat: add two-phase extension upgrade with spec.schemaVersion (#328) #209
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Unit Test | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - 'operator/src/**/*.go' | |
| - 'operator/src/go.mod' | |
| - 'operator/src/go.sum' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - 'operator/src/**/*.go' | |
| - 'operator/src/go.mod' | |
| - 'operator/src/go.sum' | |
| permissions: | |
| contents: read | |
| env: | |
| GO_VERSION: '1.25.9' | |
| jobs: | |
| unit-test: | |
| name: Run Unit Tests | |
| runs-on: ubuntu-22.04 | |
| defaults: | |
| run: | |
| working-directory: operator/src | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version: ${{ env.GO_VERSION }} | |
| cache-dependency-path: operator/src/go.sum | |
| - name: Download dependencies | |
| run: go mod download | |
| - name: Run go vet | |
| run: go vet ./... | |
| - name: Run unit tests | |
| run: | | |
| go test -v -race -timeout 10m \ | |
| $(go list ./... | grep -v /test/e2e) | |
| - name: Test Summary | |
| if: always() | |
| run: | | |
| echo "## Unit Test Results" >> $GITHUB_STEP_SUMMARY | |
| echo "✅ Unit tests completed" >> $GITHUB_STEP_SUMMARY |