name: Test

on: push

jobs:
  test:

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        electron: [ '^11.2.0' ]
        node-version: [12, 14]
        os: [ 'ubuntu-20.04' ]

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm install
      env:
        PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
    - run: npx lerna bootstrap
    - run: npm run test:lint
    - run: npm run test:unit
    - name: install integration dependencies
      run: |
        npm install electron@${{ matrix.electron }}
    - name: (macOS) disable crash dialog
      if: contains(matrix.os, 'macos')
      run: defaults write com.apple.CrashReporter DialogType none
    - name: run integration tests
      run: npm run test:cucumber
      env:
        START_LOCAL_NPM: 1

name: Test

on: push

jobs:
  test:

    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        electron: [ '^11.2.0' ]
        node-version: [12, 14]
        os: [ ubuntu-20.04, windows-2019, macos-10.15 ]

    steps:
    - uses: actions/checkout@v2
    - uses: actions/setup-node@v2
      with:
        node-version: ${{ matrix.node-version }}
    - run: npm install
      env:
        PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
    - run: npx lerna bootstrap
    - run: npm run test:lint
    - run: npm run test:unit
    - name: install integration dependencies
      run: |
        npm install electron@${{ matrix.electron }}
    - name: (macOS) disable crash dialog
      if: contains(matrix.os, 'macos')
      run: defaults write com.apple.CrashReporter DialogType none
    - name: run integration tests
      run: npm run test:cucumber
      env:
        START_LOCAL_NPM: 1

Enable running on all supported platforms
ci: Enable running on all supported platforms
