diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml new file mode 100644 index 0000000..2f5d4c4 --- /dev/null +++ b/.github/workflows/node.yml @@ -0,0 +1,32 @@ +name: Test + +on: + push: + branches: + - master + pull_request: + +permissions: + contents: read + +jobs: + test: + name: Run tests + runs-on: ubuntu-latest + strategy: + matrix: + node-version: [8.x, 10.x, 12.x, 14.x, 16.x, 18.x, 20.x] + steps: + - name: Checkout code + uses: actions/checkout@v3 + with: + persist-credentials: false + - name: Setup Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v3 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - name: Install dependencies + run: npm clean-install + - name: Test code + run: npm test