name: Integration

on:
  push:
    branches:
    - master
    - develop
  pull_request:
    branches:
    - master
    - develop

jobs:
  test:
    name: Test
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
      with:
        token: ${{ secrets.ACCESS_TOKEN }}
        submodules: true
    - name: Use Node.js 16.x
      uses: actions/setup-node@v1
      with:
        node-version: 16.x
    - name: Install Node.js dependencies
      run: npm ci
    - run: npm run re:build
    - run: npm run ts:build
    - run: npm test
      env:
        CI: true
  lint:
    name: Lint
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
      with:
        token: ${{ secrets.ACCESS_TOKEN }}
        submodules: true
    - name: Use Node.js 16.x
      uses: actions/setup-node@v1
      with:
        node-version: 16.x
    - name: Install Node.js dependencies
      run: npm ci
    - run: npm run lint
      env:
        CI: true
