Add flag to control document symbol based test discovery for java #114
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: Build and Test VS Code Extension | |
| on: | |
| push: | |
| branches: [ "main" ] | |
| pull_request: | |
| branches: [ "main" ] | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| # VS Code uses Node 18 | |
| node-version: [18.x] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'yarn' | |
| - run: yarn install | |
| - run: yarn test:ci | |
| - name: Package the extension | |
| id: package | |
| run: | | |
| yarn package | |
| PACKAGE_PATH=$(find . -name 'vscode-bazel-bsp-*.vsix') | |
| PACKAGE_NAME_WITH_SHA="${PACKAGE_PATH%.vsix}-$(echo $GITHUB_SHA | cut -c1-7).vsix" | |
| echo "package_path=$PACKAGE_PATH" >> $GITHUB_ENV | |
| echo "package_name_with_sha=$(basename $PACKAGE_NAME_WITH_SHA)" >> $GITHUB_ENV | |
| - name: Upload packaged extension artifact | |
| # Artifact is only uploaded on push to main, to preserve artifact storage capacity. | |
| if: github.event_name == 'push' && github.ref == 'refs/heads/main' | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: ${{ env.package_name_with_sha }} | |
| path: ${{ env.package_path }} |