name: CI

on: [push, pull_request]

jobs:
  ci:
    runs-on: ${{ matrix.os }}
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
    name: Run on ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - name: Setup node
      uses: actions/setup-node@v2
      with:
        node-version: 12
    - name: Build
      run: | 
        npm ci
        npm run init
        npm run build
        npm run bundle
    - name: Test
      if: matrix.os != 'ubuntu-latest'
      run: |
        npm run test
    - name: Test & Coverage
      if: matrix.os == 'ubuntu-latest'
      run: |
        npm run test-cov
        npm run check-format
        npm run merge-report && cat coverage/lcov.info
    - name: Upload Coveralls Report
      if: success() && matrix.os == 'ubuntu-latest'
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}

name: CI

on: [push, pull_request]

jobs:
  ci:
    runs-on: ${{ matrix.os }}
    timeout-minutes: 30
    strategy:
      fail-fast: false
      matrix:
        os:
          - ubuntu-latest
          - macos-latest
          - windows-latest
    name: Run on ${{ matrix.os }}
    steps:
    - uses: actions/checkout@v2
    - name: Setup node
      uses: actions/setup-node@v2
      with:
        node-version: 12
    - name: Build
      run: |
        npm ci
        npm run init
        npm run build
        npm run bundle
    - name: Test
      if: matrix.os != 'ubuntu-latest'
      run: |
        npm run test
    - name: Test & Coverage
      if: matrix.os == 'ubuntu-latest'
      run: |
        npm run test-cov
        npm run check-format
        npm run merge-report && cat coverage/lcov.info
    - name: Upload Coveralls Report
      if: success() && matrix.os == 'ubuntu-latest'
      uses: coverallsapp/github-action@master
      with:
        github-token: ${{ secrets.GITHUB_TOKEN }}

Set Github actions build timeout to 30 min
Set Github actions build timeout to 30 min

Sometimes a runner, especially the Windows one, goes wrong and runs
until the default timeout of 6 hours is hit. Introduce a timeout of 30
minutes to avoid occupying the runner for so long needlessly.