name: PR
on: [pull_request]

jobs:
  pr:
    strategy:
      matrix:
        step: ['lint', 'test', 'build', 'deno']
    name: ${{ matrix.step }}
    runs-on: ubuntu-latest
    env:
      YARN_ENABLE_SCRIPTS: false
      CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
    steps:
    - uses: actions/checkout@ac593985615ec2ede58e132d2e21d2b1cbd6127c
    - uses: denoland/setup-deno@004814556e37c54a2f6e31384c9e18e983317366
      with:
        deno-version: vx.x.x
    - name: ${{ matrix.step }}
      if: always()
      run: |
        yarn install --immutable | grep -v 'YN0013'
        yarn ${{ matrix.step }}
