diff --git a/.github/workflows/client-ci.yml b/.github/workflows/client-ci.yml index 094dffd..8f90bf9 100644 --- a/.github/workflows/client-ci.yml +++ b/.github/workflows/client-ci.yml @@ -3,25 +3,32 @@ name: Client CI on: push: branches: [main, develop] - paths: - - "client/**" pull_request: branches: [main, develop] - paths: - - "client/**" jobs: - build: + build-and-test: runs-on: ubuntu-latest - defaults: - run: - working-directory: client/ steps: - - uses: actions/checkout@v4 - - name: Install Dependencies + #1 Checkout the code + - name: Checkout Repository + uses: actions/checkout@v4 + + #2 Setup Node.js environment + - name: Setup Node.js Environment + uses: actions/setup-node@v4 + with: + node-version: "20" + cache: "npm" + cache-dependency-path: client/package-lock.json + + #3 Install dependencies + - name: Install Client Dependencies run: npm ci - - name: Run Tests + working-directory: client/ + + #4 Run client tests + - name: Run Client Test Suite run: npm test - - name: Build - run: npm run build + working-directory: client/