pipeline { agent any stages { stage('Checkout') { steps { checkout scm } } stage('API Unit & Contract Tests') { steps { sh 'node --test api/scoreboard.test.js' } } stage('CLI Build & Tests') { steps { dir('cli') { sh ''' npm ci --no-audit --no-fund || npm install --no-audit --no-fund npm run build npm test ''' } } } } post { always { deleteDir() } } }