From c513143db65883c8f3c3c8c8ebd68432f0dc1e4c Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 14:49:18 +0100 Subject: [PATCH 1/5] CI: Adds the test step to CI --- .github/tests.yml | 20 ++++++++++++++++++++ 1 file changed, 20 insertions(+) create mode 100644 .github/tests.yml diff --git a/.github/tests.yml b/.github/tests.yml new file mode 100644 index 0000000..d1da92c --- /dev/null +++ b/.github/tests.yml @@ -0,0 +1,20 @@ +name: 'Run tests' + +on: [push, workflow_dispatch] + +jobs: + run-tests: + runs-on: ubuntu-latest + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup node + uses: actions/setup-node@v4 + with: +# TODO: add version to a .nvmrc or at least a variable + node-version: 16.13.x + cache: npm + - name: Install + run: npm ci + - name: Run tests + run: npm run test:unit From 94bb7eae1a2c1885d7911b4ba7874f05c3f14863 Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 14:51:36 +0100 Subject: [PATCH 2/5] CI: Runs tests on pull requests --- .github/tests.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/tests.yml b/.github/tests.yml index d1da92c..9438da4 100644 --- a/.github/tests.yml +++ b/.github/tests.yml @@ -1,6 +1,6 @@ name: 'Run tests' -on: [push, workflow_dispatch] +on: [push, workflow_dispatch, pull_request] jobs: run-tests: From 28a9646a643bd0ae064d9cb8e39a731b5ad8c266 Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 14:53:59 +0100 Subject: [PATCH 3/5] CI: Fix workflow location --- .github/{ => workflows}/tests.yml | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/{ => workflows}/tests.yml (100%) diff --git a/.github/tests.yml b/.github/workflows/tests.yml similarity index 100% rename from .github/tests.yml rename to .github/workflows/tests.yml From 243a44147d0acc3fdb7e227e3c1f09376853c1b0 Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 15:00:13 +0100 Subject: [PATCH 4/5] CI: Update node version --- .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 9438da4..f16ec50 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -12,7 +12,7 @@ jobs: uses: actions/setup-node@v4 with: # TODO: add version to a .nvmrc or at least a variable - node-version: 16.13.x + node-version: 18.12.1 cache: npm - name: Install run: npm ci From f3172cbb92437b2e3ad78837a73346b721beedd8 Mon Sep 17 00:00:00 2001 From: Gauthier Fiorentino Date: Thu, 14 Mar 2024 15:01:50 +0100 Subject: [PATCH 5/5] CI: Fix multiple dispatch on pull requests push --- .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 f16ec50..5a09637 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -1,6 +1,6 @@ name: 'Run tests' -on: [push, workflow_dispatch, pull_request] +on: [push, workflow_dispatch] jobs: run-tests: