From 793d41a84dec2bcc2498f38f7ff232cd480d72a0 Mon Sep 17 00:00:00 2001 From: mao-sz <122839503+mao-sz@users.noreply.github.com> Date: Thu, 4 Sep 2025 23:20:56 +0100 Subject: [PATCH 1/3] Add GH workflow for solution tests --- .github/workflows/tests.yml | 15 +++++++++++++++ 1 file changed, 15 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 00000000000..158ca122d8e --- /dev/null +++ b/.github/workflows/tests.yml @@ -0,0 +1,15 @@ +name: Tests +on: + pull_request: + paths: + - '**/solution/*.js' + +jobs: + tests: + name: Run tests + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v4 + - run: npm install + - run: npm run test -- **/solution From c1e2aa7388c67ce5fa7ac22a8dd3c7bb16b62192 Mon Sep 17 00:00:00 2001 From: mao-sz <122839503+mao-sz@users.noreply.github.com> Date: Thu, 4 Sep 2025 23:21:28 +0100 Subject: [PATCH 2/3] Remove CircleCI config Workflows migrated to GH actions --- .circleci/config.yml | 20 -------------------- 1 file changed, 20 deletions(-) delete mode 100644 .circleci/config.yml diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index 14716683aba..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,20 +0,0 @@ -version: 2.1 - -orbs: - node: circleci/node@5.1.0 - -jobs: - test-solutions: - executor: node/default - steps: - - checkout - - node/install-packages: - pkg-manager: npm - - run: - command: npm run test solution - name: Run tests in **/solution/*.spec.js - -workflows: - test-solutions: - jobs: - - test-solutions From b43bda0f79848bbb7f3b768e0067478a186ef497 Mon Sep 17 00:00:00 2001 From: mao-sz <122839503+mao-sz@users.noreply.github.com> Date: Thu, 4 Sep 2025 23:32:14 +0100 Subject: [PATCH 3/3] Test workflow should fail sumAll-solution.spec.js --- 09_sumAll/solution/sumAll-solution.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/09_sumAll/solution/sumAll-solution.js b/09_sumAll/solution/sumAll-solution.js index ae01a5b26cc..700acaea4de 100644 --- a/09_sumAll/solution/sumAll-solution.js +++ b/09_sumAll/solution/sumAll-solution.js @@ -3,7 +3,7 @@ const sumAll = function (min, max) { if (min < 0 || max < 0) return "ERROR"; if (min > max) { const temp = min; - min = max; + // min = max; max = temp; }