Updates grammar and semantic analysis to 5.23 #1320
Workflow file for this run
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
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
env: | |
NODE_OPTIONS: '--max_old_space_size=8192' | |
jobs: | |
lint-and-format: | |
name: Run eslint and check formatting | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup antlr4 | |
uses: ./.github/actions/setup-antlr4 | |
- name: Install dependencies with frozen lock file and generate parser | |
run: npm ci | |
- name: Build project | |
env: | |
NODE_OPTIONS: '--max_old_space_size=8192' | |
run: npm run build | |
- name: Check there are no linting errors | |
run: npm run lint | |
- name: List files that have not been formatted properly | |
run: | | |
npm run format | |
(git diff-index --name-status HEAD | grep ".*\.ts" && exit 1) || echo "\n\nAll Typescript files are correctly formatted" | |
unit-test: | |
name: Unit tests | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup antlr4 | |
uses: ./.github/actions/setup-antlr4 | |
- name: Install dependencies with frozen lock file and generate parser | |
run: npm ci | |
- name: Builds and run tests | |
# Tests with the same flags that VSCode does | |
run: | | |
npm test -- --filter=!antlr4 -- --passWithNoTests | |
npm test -- --filter=antlr4 | |
e2e-test: | |
name: E2E tests | |
timeout-minutes: 60 | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup antlr4 | |
uses: ./.github/actions/setup-antlr4 | |
- name: Install dependencies | |
run: npm ci | |
- name: Build project | |
run: npm run build | |
- name: Install Playwright Browsers | |
run: npx playwright install --with-deps | |
- name: Run e2e test | |
# We need a graphics server to run integration tests with VSCode | |
# https://code.visualstudio.com/api/working-with-extensions/continuous-integration#github-actions | |
run: xvfb-run -a npm run test:e2e | |
- uses: actions/upload-artifact@v4 | |
if: always() | |
with: | |
name: playwright-report | |
path: packages/react-codemirror/playwright-report/ | |
retention-days: 30 |