name: CI
on:
  - push
  - pull_request
jobs:
  Test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version:
          - <%= nodeEngineVersion %>
    steps:
      - name: Clone repository
        uses: actions/checkout@v2

      - name: Use Node ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install dependencies
        run: npm install

      - name: Lint
        run: npm run lint<% if ( typescript ) { %>

      - name: Check types
        run: npm run lint:types<% } %><% if ( automatedTests ) { %><% if ( browserModule && !cloudBrowsers ) { %>

      - name: Set display environment
        run: export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3;<% } %>

      - name: Test<% if ( browserModule && cloudBrowsers ) { %>
        env:
          BROWSERSTACK_USERNAME: ${{ secrets.BROWSERSTACK_USERNAME }}
          BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}<% } %>
        run: npm test<% } %><% if ( codeCoverageService ) { %>

  Posttest:
    needs: Test
    steps:
      - name: Post-test procedure
        run: npm run posttest:ci<% } %>

name: CI
on:
  - push
  - pull_request
jobs:
  Test:
    runs-on: ubuntu-latest
    strategy:
      matrix:
        node-version:
          - <%= nodeEngineVersion %>
    steps:
      - name: Clone repository
        uses: actions/checkout@v2

      - name: Use Node ${{ matrix.node-version }}
        uses: actions/setup-node@v2
        with:
          node-version: ${{ matrix.node-version }}

      - name: Install dependencies
        run: npm install

      - name: Lint
        run: npm run lint<% if ( typescript ) { %>

      - name: Check types
        run: npm run lint:types<% } %><% if ( automatedTests ) { %><% if ( browserModule && !cloudBrowsers ) { %>

      - name: Set display environment
        run: export DISPLAY=:99.0; sh -e /etc/init.d/xvfb start; sleep 3;<% } %>

      - name: Test<% if ( browserModule && cloudBrowsers ) { %>
        env:
          BROWSER_STACK_USERNAME: ${{ secrets.BROWSER_STACK_USERNAME }}
          BROWSER_STACK_ACCESS_KEY: ${{ secrets.BROWSER_STACK_ACCESS_KEY }}<% } %>
        run: npm test<% } %><% if ( codeCoverageService ) { %>

  Posttest:
    needs: Test
    steps:
      - name: Post-test procedure
        run: npm run posttest:ci<% } %>

Update Browserstack user name environment variable for GitHub Actions
Update Browserstack user name environment variable for GitHub Actions
