Fix MCP registry publishing with GitHub OIDC #148
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: Run Tests | |
| on: | |
| push: | |
| branches: [ main, master ] | |
| pull_request: | |
| branches: [ main, master ] | |
| jobs: | |
| test: | |
| runs-on: macos-latest | |
| strategy: | |
| matrix: | |
| node-version: [18.x, 20.x, 22.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Install dependencies | |
| run: npm ci | |
| - name: Check for Xcode | |
| id: check_xcode | |
| run: | | |
| # In CI, Xcode is installed but not accessible via JXA without a GUI session | |
| # Always skip Xcode-dependent tests in CI | |
| echo "has_xcode=false" >> $GITHUB_OUTPUT | |
| echo "Xcode is installed but not accessible via JXA in CI environment" | |
| - name: Run tests (with Xcode) | |
| if: steps.check_xcode.outputs.has_xcode == 'true' | |
| run: npm test | |
| env: | |
| NODE_ENV: test | |
| - name: Run tests (CI - without Xcode integration) | |
| if: steps.check_xcode.outputs.has_xcode == 'false' | |
| run: npm test | |
| env: | |
| NODE_ENV: test | |
| SKIP_XCODE_TESTS: true | |
| - name: Run linter (if available) | |
| run: npm run lint --if-present | |
| continue-on-error: true |