name: Test JS

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        node-version: 10.x
    - name: Install dependencies
      run: |
        sudo apt-get install -y firefox
    - name: Get yarn cache
      id: yarn-cache
      run: echo "::set-output name=dir::$(yarn cache dir)"
    - uses: actions/cache@v1
      with:
        path: ${{ steps.yarn-cache.outputs.dir }}
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          ${{ runner.os }}-yarn-
    - name: yarn install, build, integrity, test
      run: |
        yarn install
        yarn run build
        yarn run integrity
        
        pushd packages/base
        yarn run test:unit:firefox:headless
        popd

        pushd packages/controls
        yarn run test:unit:firefox:headless
        popd

        pushd packages/html-manager
        yarn run test:unit:firefox:headless
        popd

        pushd examples/web1
        yarn run test:firefox:headless
        popd

      env:
        CI: true

name: Test JS

on: [push, pull_request]

jobs:
  build:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v1
    - name: Use Node.js 10.x
      uses: actions/setup-node@v1
      with:
        node-version: 10.x
    - name: Install dependencies
      run: |
        sudo apt-get install -y firefox
    - name: Get yarn cache
      id: yarn-cache
      run: echo "::set-output name=dir::$(yarn cache dir)"
    - uses: actions/cache@v1
      with:
        path: ${{ steps.yarn-cache.outputs.dir }}
        key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
        restore-keys: |
          ${{ runner.os }}-yarn-
    - name: yarn install, build, integrity, test
      run: |
        yarn install
        yarn run build
        yarn run build:examples
        yarn run integrity
        
        pushd packages/base
        yarn run test:unit:firefox:headless
        popd

        pushd packages/controls
        yarn run test:unit:firefox:headless
        popd

        pushd packages/html-manager
        yarn run test:unit:firefox:headless
        popd

        pushd examples/web1
        yarn run test:firefox:headless
        popd

      env:
        CI: true

Build examples in the tests
Build examples in the tests