# This workflow will do a clean install of node dependencies, build the source code and run tests across different versions of node
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-nodejs-with-github-actions

name: Test

on:
  pull_request:
    branches: [ main, v*.* ]

jobs:
  test:
    runs-on: ubuntu-latest

    steps:
    - uses: actions/checkout@v2
    - name: Use Node.js 10.15
      uses: actions/setup-node@v1
      with:
        always-auth: true
        node-version: '10.15'
        registry-url: https://npm.pkg.github.com/
        scope: '@juzibot'

    - run: npm i
      env:
        NODE_AUTH_TOKEN: ${{secrets.JUZI_NPM_TOKEN}}

    - run: npm run lint
