os: linux
dist: jammy
language: node_js
node_js: node

jobs:
  include:
    - addons:
        chrome: "stable"
        firefox: "latest"
        apt:
          packages:
            - libnss3
      services:
        - xvfb
      before_install:
        - npm install testem
        - ./node_modules/.bin/testem launchers

      before_script:
        - (cd scripts && python3.10 make_doc.py)
        - (cd scripts && python3.10 transform_full_grammar.py)
        - (cd scripts && python3.10 make_dist.py)

      script:
        # Some day, put back Chrome or "Headless Chrome" as well. For some reason
        # as of 2022 Aug 23, the testem websocket connection is sometimes reset,
        # which prevents the browser from reporting results to the testem process
        # when running on Chrome.
        - ./node_modules/.bin/testem --launch Firefox -t www/tests/run_tests.html ci

    - language: python
      python: '3.10'
      before_install: pip install --upgrade pip
      before_script: pip install flake8
      script:
        - EXCLUDE=./.*,scripts/make_ast_classes.py,www/gallery/kanban.py,www/gallery/sheet.py,www/src/Lib,www/tests
        # stop the build if there are Python syntax errors or undefined names
        - flake8 --builtins=__BRYTHON__ --exclude=$EXCLUDE --select=E9,F63,F7,F82 --show-source --statistics

os: linux
dist: jammy
language: node_js
node_js: node

jobs:
  include:
    - addons:
        chrome: "stable"
        firefox: "latest"
        apt:
          packages:
            - libnss3
      services:
        - xvfb
      before_install:
        - npm install testem
        - ./node_modules/.bin/testem launchers

      before_script:
        - (cd scripts && python3.10 make_doc.py)
        - (cd scripts && python3.10 transform_full_grammar.py)
        - (cd scripts && python3.10 make_dist.py)

      script:
        # Some day, put back Chrome or "Headless Chrome" as well. For some reason
        # as of 2022 Aug 23, the testem websocket connection is sometimes reset,
        # which prevents the browser from reporting results to the testem process
        # when running on Chrome.
        - ./node_modules/.bin/testem --launch Firefox -t www/tests/run_tests.html ci

    - language: python
      python: '3.10'
      before_install: pip install --upgrade pip
      before_script: pip install flake8
      script:
        - EXCLUDE=./.*,scripts/make_ast_classes.py,www/src/Lib,www/tests
        # stop the build if there are Python syntax errors or undefined names
        - flake8 --builtins=__BRYTHON__ --exclude=$EXCLUDE --select=E9,F63,F7,F82 --show-source --statistics

Remove gallery examples from flake8 excludes
Remove gallery examples from flake8 excludes
