| name: CI - JavaScript |
| |
| on: |
| workflow_call: |
| workflow_dispatch: |
| |
| jobs: |
| build: |
| name: Build |
| uses: ./.github/workflows/bazel.yml |
| with: |
| name: Build |
| cache-key: javascript-build |
| run: bazel build //javascript/node/selenium-webdriver:selenium-webdriver |
| |
| atoms: |
| name: Atom Tests |
| needs: build |
| uses: ./.github/workflows/bazel.yml |
| with: |
| name: Atom Tests |
| browser: firefox |
| cache-key: atoms |
| run: > |
| bazel test --test_tag_filters=firefox |
| //javascript/atoms/... |
| //javascript/selenium-atoms/... |
| //javascript/webdriver/... |
| |
| browser-tests: |
| name: Browser Tests |
| needs: build |
| uses: ./.github/workflows/bazel.yml |
| strategy: |
| fail-fast: false |
| matrix: |
| browser: |
| - chrome |
| - firefox |
| with: |
| name: Browser Tests (${{ matrix.browser }}) |
| browser: ${{ matrix.browser }} |
| cache-key: node |
| run: | |
| export SELENIUM_BROWSER=${{ matrix.browser }} |
| bazel test --flaky_test_attempts 3 //javascript/node/selenium-webdriver:tests |
| |
| # As soon as this gets merged https://github.com/facebook/jest/pull/9351, we should upgrade Jest and |
| # run bazel test javascript/grid-ui:test for these tests |
| grid-ui: |
| name: Grid UI Tests |
| needs: build |
| runs-on: ubuntu-latest |
| steps: |
| - name: Checkout source tree |
| uses: actions/checkout@v3 |
| - name: Setup Node |
| uses: actions/setup-node@v3 |
| with: |
| node-version: 16 |
| - name: NPM install |
| run: cd javascript/grid-ui && npm install |
| - name: Run unit tests |
| run: cd javascript/grid-ui && npm test |