diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..d6d0097 --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,34 @@ +name: Tests for PR +on: + pull_request: + types: + - opened + - synchronize + - reopened + - labeled + - unlabeled + +jobs: + test: + name: 'Node.js v${{ matrix.node }}' + runs-on: ubuntu-latest + strategy: + matrix: + node: + - 16 + steps: + - uses: actions/setup-node@v1 + with: + node-version: '${{ matrix.node }}' + - uses: actions/checkout@v2 + - name: 'Cache node_modules' + uses: actions/cache@v2 + with: + path: ~/.npm + key: ${{ runner.os }}-node-v${{ matrix.node }}-${{ hashFiles('**/package-lock.json') }} + restore-keys: | + ${{ runner.os }}-node-v${{ matrix.node }}- + - name: Install Dependencies + run: npm install + - name: Run All Node.js Tests + run: npm run test