Document VS Code extension and expand test coverage #262
Workflow file for this run
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: VS Extension Tests | |
| on: | |
| push: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/b2c-vs-extension/**' | |
| - 'packages/b2c-tooling-sdk/**' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - '.github/workflows/ci-vs-extension.yml' | |
| pull_request: | |
| branches: | |
| - main | |
| paths: | |
| - 'packages/b2c-vs-extension/**' | |
| - 'packages/b2c-tooling-sdk/**' | |
| - 'pnpm-lock.yaml' | |
| - 'pnpm-workspace.yaml' | |
| - '.github/workflows/ci-vs-extension.yml' | |
| permissions: | |
| contents: read | |
| env: | |
| SFCC_DISABLE_TELEMETRY: ${{ vars.SFCC_DISABLE_TELEMETRY }} | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| node-version: [22.x] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v6 | |
| - name: Setup Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@v5 | |
| - name: Get pnpm store directory | |
| shell: bash | |
| run: | | |
| echo "STORE_PATH=$(pnpm store path --silent)" >> $GITHUB_ENV | |
| - name: Setup pnpm cache | |
| uses: actions/cache@v5 | |
| with: | |
| path: ${{ env.STORE_PATH }} | |
| key: ${{ runner.os }}-pnpm-store-${{ hashFiles('**/pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pnpm-store- | |
| - name: Cache VS Code test binary | |
| uses: actions/cache@v5 | |
| with: | |
| path: packages/b2c-vs-extension/.vscode-test | |
| key: ${{ runner.os }}-vscode-test-${{ hashFiles('packages/b2c-vs-extension/.vscode-test.mjs', 'pnpm-lock.yaml') }} | |
| restore-keys: | | |
| ${{ runner.os }}-vscode-test- | |
| - name: Install dependencies | |
| run: pnpm install --frozen-lockfile | |
| - name: Build packages | |
| run: pnpm -r run build | |
| - name: Run VS Extension tests | |
| working-directory: packages/b2c-vs-extension | |
| run: xvfb-run -a pnpm run test |