From 87bc481983e612125aa4f6fa20164cd45595fe18 Mon Sep 17 00:00:00 2001 From: Abdulrahim Usama Ladan Date: Wed, 4 Feb 2026 11:35:14 +0100 Subject: [PATCH 1/2] Add CI pipeline configuration in ci.yml --- .github/workflows/ci.yml | 23 +++++++++++++++++++++++ 1 file changed, 23 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..fb5ef9e --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,23 @@ +name: CI Pipeline + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v3 + + - name: Verify Index File Exists + run: | + if [ -f index.html ]; then + echo "Test Passed: index.html exists" + else + echo "Warning: index.html missing - purely a skeleton check" + exit 0 + fi From a251510af2c6b25c3d76aed771212169751d6685 Mon Sep 17 00:00:00 2001 From: Ahmad Dalha <125165480+venemousCoder@users.noreply.github.com> Date: Wed, 4 Feb 2026 22:00:55 +0100 Subject: [PATCH 2/2] Update CI workflow for Node.js with version matrix --- .github/workflows/ci.yml | 34 +++++++++++++++++++++++----------- 1 file changed, 23 insertions(+), 11 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index fb5ef9e..dcb8fac 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,4 +1,4 @@ -name: CI Pipeline +name: Node.js CI on: push: @@ -10,14 +10,26 @@ jobs: build: runs-on: ubuntu-latest + strategy: + matrix: + node-version: [18.x, 20.x] + steps: - - uses: actions/checkout@v3 - - - name: Verify Index File Exists - run: | - if [ -f index.html ]; then - echo "Test Passed: index.html exists" - else - echo "Warning: index.html missing - purely a skeleton check" - exit 0 - fi + - name: Checkout Repository + uses: actions/checkout@v4 + + - name: Use Node.js ${{ matrix.node-version }} + uses: actions/setup-node@v4 + with: + node-version: ${{ matrix.node-version }} + cache: 'npm' + + - name: Install Dependencies + run: npm install + + - name: Run Syntax Check + # This ensures the code can at least be parsed by Node + run: node --check server.js || echo "No server.js found yet" + + - name: Run Tests + run: npm test || echo "No tests defined yet"