From 35f2949287f0596833a408b4ca990e51f7b97b0e Mon Sep 17 00:00:00 2001 From: Yash Kumar Verma Date: Sat, 2 Mar 2024 19:09:55 +0530 Subject: [PATCH 1/2] feat: run tests on each PR merge --- .github/workflows/tests.yml | 32 ++++++++++++++++++++++++++++++++ 1 file changed, 32 insertions(+) create mode 100644 .github/workflows/tests.yml diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml new file mode 100644 index 00000000..ac8da1a4 --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,32 @@ +name: Node.js CI + +on: + pull_request: + branches: + - "*" + push: + branches: + - "*" + +jobs: + build: + runs-on: ubuntu-latest + + strategy: + matrix: + node-version: [14, 16, 18] + + steps: + - name: Checkout repository + uses: actions/checkout@v2 + + - name: Use Node.js + uses: actions/setup-node@v2 + with: + node-version: ${{ matrix.node-version }} + + - name: Install dependencies + run: npm install + + - name: Run tests + run: npm test From 1b0f275afd7563a4c2d0a4bbbca069b2b7d2858a Mon Sep 17 00:00:00 2001 From: Yash Kumar Verma Date: Sat, 2 Mar 2024 19:18:24 +0530 Subject: [PATCH 2/2] only test on v16 and v18 --- .github/workflows/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index ac8da1a4..cfb66712 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -14,7 +14,7 @@ jobs: strategy: matrix: - node-version: [14, 16, 18] + node-version: [16, 18] steps: - name: Checkout repository