chore: update .gitignore to exclude build artifacts #1
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: Test VS Code CI Infrastructure | ||
| # Test workflow for the vscode-extension-ci package and composite actions | ||
| # Can be run manually from the Actions tab on the feat/add-vscode-extension-ci branch | ||
| on: | ||
| workflow_dispatch: | ||
| inputs: | ||
| test-repo: | ||
| description: 'Repository to test against' | ||
| required: false | ||
| default: 'apex-language-support' | ||
| type: choice | ||
| options: | ||
| - apex-language-support | ||
| - salesforcedx-vscode | ||
| jobs: | ||
| test-npm-package: | ||
| name: Test NPM Package Build | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout github-workflows | ||
| uses: actions/checkout@v6 | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '22.x' | ||
| - name: Install dependencies | ||
| run: | | ||
| cd packages/vscode-extension-ci | ||
| npm install | ||
| - name: Build package | ||
| run: | | ||
| cd packages/vscode-extension-ci | ||
| npm run build | ||
| - name: Verify CLI exists | ||
| run: | | ||
| cd packages/vscode-extension-ci | ||
| node dist/cli.js --help | ||
| - name: Test CLI commands exist | ||
| run: | | ||
| cd packages/vscode-extension-ci | ||
| node dist/cli.js --help | grep -E "ext-package-selector|ext-change-detector|ext-build-type" | ||
| test-with-apex-language-support: | ||
| name: Test with apex-language-support | ||
| runs-on: ubuntu-latest | ||
| if: inputs.test-repo == 'apex-language-support' | ||
| steps: | ||
| - name: Checkout github-workflows | ||
| uses: actions/checkout@v6 | ||
| path: .ci-toolkit | ||
| - name: Checkout apex-language-support | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: forcedotcom/apex-language-support | ||
| path: test-repo | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '22.x' | ||
| - name: Build vscode-extension-ci | ||
| run: | | ||
| cd .ci-toolkit/packages/vscode-extension-ci | ||
| npm install | ||
| npm run build | ||
| - name: Install apex-language-support dependencies | ||
| run: | | ||
| cd test-repo | ||
| npm ci | ||
| - name: Test ext-package-selector | ||
| run: | | ||
| cd test-repo | ||
| node ../.ci-toolkit/packages/vscode-extension-ci/dist/cli.js ext-package-selector | ||
| - name: Test ext-build-type | ||
| run: | | ||
| cd test-repo | ||
| node ../.ci-toolkit/packages/vscode-extension-ci/dist/cli.js ext-build-type | ||
| test-with-salesforcedx-vscode: | ||
| name: Test with salesforcedx-vscode | ||
| runs-on: ubuntu-latest | ||
| if: inputs.test-repo == 'salesforcedx-vscode' | ||
| steps: | ||
| - name: Checkout github-workflows | ||
| uses: actions/checkout@v6 | ||
| path: .ci-toolkit | ||
| - name: Checkout salesforcedx-vscode | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: forcedotcom/salesforcedx-vscode | ||
| path: test-repo | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '22.x' | ||
| - name: Build vscode-extension-ci | ||
| run: | | ||
| cd .ci-toolkit/packages/vscode-extension-ci | ||
| npm install | ||
| npm run build | ||
| - name: Install salesforcedx-vscode dependencies | ||
| run: | | ||
| cd test-repo | ||
| npm ci | ||
| - name: Test ext-package-selector | ||
| run: | | ||
| cd test-repo | ||
| node ../.ci-toolkit/packages/vscode-extension-ci/dist/cli.js ext-package-selector | ||
| - name: Test ext-build-type | ||
| run: | | ||
| cd test-repo | ||
| node ../.ci-toolkit/packages/vscode-extension-ci/dist/cli.js ext-build-type | ||
| test-composite-actions: | ||
| name: Test Composite Actions | ||
| runs-on: ubuntu-latest | ||
| steps: | ||
| - name: Checkout github-workflows | ||
| uses: actions/checkout@v6 | ||
| path: .ci-toolkit | ||
| - name: Checkout apex-language-support | ||
| uses: actions/checkout@v6 | ||
| with: | ||
| repository: forcedotcom/apex-language-support | ||
| path: test-repo | ||
| - name: Setup Node.js | ||
| uses: actions/setup-node@v6 | ||
| with: | ||
| node-version: '22.x' | ||
| - name: Test npm-install-with-retries (in test-repo) | ||
| working-directory: test-repo | ||
| run: | | ||
| # Simulate what the action does | ||
| npm config set fetch-timeout 600000 | ||
| npm ci | ||
| - name: Test detect-packages | ||
| id: detect | ||
| uses: ./.ci-toolkit/.github/actions/vscode/detect-packages | ||
| - name: Show detected packages | ||
| run: | | ||
| echo "Detected packages: ${{ steps.detect.outputs.packages }}" | ||
| echo "Detected extensions: ${{ steps.detect.outputs.extensions }}" | ||
| - name: Test calculate-artifact-name | ||
| id: artifact-name | ||
| uses: ./.ci-toolkit/.github/actions/vscode/calculate-artifact-name | ||
| with: | ||
| extension-name: apex-lsp-vscode-extension | ||
| mode: nightly | ||
| - name: Show artifact name | ||
| run: echo "Artifact name: ${{ steps.artifact-name.outputs.artifact-name }}" | ||
| test-complete: | ||
| name: All Tests Complete | ||
| runs-on: ubuntu-latest | ||
| needs: [test-npm-package, test-composite-actions] | ||
| if: always() | ||
| steps: | ||
| - name: Check results | ||
| env: | ||
| NPM_RESULT: ${{ needs.test-npm-package.result }} | ||
| ACTIONS_RESULT: ${{ needs.test-composite-actions.result }} | ||
| run: | | ||
| echo "NPM Package Build: $NPM_RESULT" | ||
| echo "Composite Actions: $ACTIONS_RESULT" | ||
| if [[ "$NPM_RESULT" != "success" ]] || [[ "$ACTIONS_RESULT" != "success" ]]; then | ||
| echo "❌ Some tests failed" | ||
| exit 1 | ||
| fi | ||
| echo "✅ All tests passed" | ||