fix: Workflow Bot -- Update Dictionaries (#964) #1890
This file contains 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-test" | |
on: # rebuild any PRs and main branch changes | |
workflow_dispatch: | |
pull_request: | |
push: | |
branches: | |
- main | |
jobs: | |
list_extensions: | |
runs-on: ubuntu-latest | |
outputs: | |
extension_list: ${{ env.EXTENSION_LIST }} | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: From Script | |
run: | | |
echo extensions_from_script=$(./scripts/list-extensions.sh) >> $GITHUB_ENV | |
- name: EXTENSION_LIST | |
env: | |
EXTENSION_LIST: ${{ env.extensions_from_script }} | |
run: | | |
echo EXTENSION_LIST=$EXTENSION_LIST >> $GITHUB_ENV | |
build-test: | |
runs-on: ubuntu-latest | |
needs: | |
- list_extensions | |
strategy: | |
matrix: | |
extension_dir: ${{ fromJSON(needs.list_extensions.outputs.extension_list) }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ vars.DEFAULT_NODE_VERSION }} | |
cache: npm | |
- run: npm install | |
- run: | | |
cd ${{ matrix.extension_dir }} | |
npm run pack-extension | |
npm run test:cspell | |
- name: Run Linux | |
if: runner.os == 'Linux' | |
run: | | |
cd ${{ matrix.extension_dir }} | |
xvfb-run -a npm run test | |
- name: Run Windows and MacOS | |
if: runner.os != 'Linux' | |
run: | | |
cd ${{ matrix.extension_dir }} | |
npm run test | |
# Run the spell checker on all the samples using the extension's settings. | |
# This will help with dictionary updates. | |
check-samples: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: ${{ vars.DEFAULT_NODE_VERSION }} | |
cache: npm | |
- run: npm install | |
- name: Check Samples | |
run: | | |
npm run test:cspell |