diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index c7bfadd..6e04ecb 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -7,12 +7,37 @@ on: branches: [master, main] tags: - "v*.*.*" + pull_request: + branches: [master, main] # Allows you to run this workflow manually from the Actions tab workflow_dispatch: jobs: + + run_tests_on_nodejs: + name: run tests on nodejs + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [12.x, 14.x, 16.x] + + steps: + - uses: actions/checkout@v2 + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + - run: npm install + - run: npm test + - name: check coverage + if: ${{ success() }} + run: npm run check-coverage + docker: + needs: run_tests_on_nodejs runs-on: ubuntu-latest steps: - name: Checkout