diff --git a/.github/workflows/node.yml b/.github/workflows/node.yml index 0d919c97..a244fa5f 100644 --- a/.github/workflows/node.yml +++ b/.github/workflows/node.yml @@ -17,10 +17,10 @@ jobs: mongodb-version: ['5.0'] runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 + - uses: actions/checkout@v2 - name: Use Node.js version ${{ matrix.node-version }} - uses: actions/setup-node@v3 + uses: actions/setup-node@v2 with: node-version: ${{ matrix.node-version }} @@ -28,14 +28,26 @@ jobs: uses: supercharge/mongodb-github-action@1.11.0 with: mongodb-version: ${{ matrix.mongodb-version }} + + - name: Clean and Install server dependencies + run: | + rm -rf server/node_modules + npm install --prefix server + + - name: Install client dependencies + run: npm install --prefix client + + - name: Build client + run: npm run build --prefix client + + - name: Set Jest permissions + run: chmod +x server/node_modules/.bin/jest + + - name: Run Server Tests + run: npm test --prefix server + + - name: Run Client Tests + run: npm test --prefix client - - name: Install dependencies - run: npm install - - - name: Build and Start Application - run: npm run deploy - - - name: Run Tests - run: npm test