From 446383b1af1104f858d86355a503a9cca04ba8e1 Mon Sep 17 00:00:00 2001 From: Fityan Date: Fri, 6 Oct 2023 07:39:18 +0700 Subject: [PATCH] ci: create pr-tests.yml and remove `pull_request` event from tests.yml --- .github/workflows/pr-tests.yml | 24 ++++++++++++++++++++++++ .github/workflows/tests.yml | 3 --- 2 files changed, 24 insertions(+), 3 deletions(-) create mode 100644 .github/workflows/pr-tests.yml diff --git a/.github/workflows/pr-tests.yml b/.github/workflows/pr-tests.yml new file mode 100644 index 00000000..0d88ce5f --- /dev/null +++ b/.github/workflows/pr-tests.yml @@ -0,0 +1,24 @@ +name: "Test the PR" +on: + pull_request: + branches: + - main +jobs: + run_test: + name: "Run tests" + runs-on: ubuntu-latest + + strategy: + max-parallel: 1 + matrix: + node-version: [18.x, 20.x] + # See supported Node.js release schedule at https://nodejs.org/en/about/releases + + steps: + - uses: actions/checkout@v3 + - name: Install modules + run: npm ci + - name: Run unit tests + run: npm run test + - name: Build + run: npm run build diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index 921c7eb7..e34d640b 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -6,9 +6,6 @@ on: push: branches: - main - pull_request: - branches: - - main jobs: run_test: name: "Run tests"