From 069e4203299628b69722fb6716789b41cfbb24bf Mon Sep 17 00:00:00 2001 From: Nelson Trindade <48919500+nelsontr@users.noreply.github.com> Date: Mon, 30 Oct 2023 12:55:40 +0000 Subject: [PATCH] Update main.yml --- .github/workflows/main.yml | 111 +++++++++++++++++++------------------ 1 file changed, 56 insertions(+), 55 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 202be6ec..fd05c983 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -3,58 +3,59 @@ name: main on: [push, pull_request] jobs: - setup: - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3.5.3 - - name: Setup Node - uses: actions/setup-node@v3.7.0 - with: - node-version: '16' - - - client_dependencies: - needs: - - setup - runs-on: ubuntu-latest - steps: - - name: Install client dependencies - run: | - cd client - npm install - cd .. - - client_build: - needs: - - client_dependencies - runs-on: ubuntu-latest - steps: - - name: Build client - run: | - cd client - npm run build - cd .. - - server_dependencies: - needs: - - setup - runs-on: ubuntu-latest - steps: - - name: Install server dependencies - run: | - cd server - npm install - cd .. - - testing: - needs: - - Client-Build - runs-on: ubuntu-latest - steps: - - name: Frontend Tests - if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' || github.event_name == 'push' && github.ref == 'refs/heads/master' }} - run: | - cd client - npm run test - cd .. + setup_stage: + runs-on: ubuntu-latest + + steps: + - name: Checkout + uses: actions/checkout@v3.6.0 + + - name: Setup Node + uses: actions/setup-node@v3.8.2 + with: + node-version: "16" + + client_dependencies: + needs: + - setup_stage + runs-on: ubuntu-latest + steps: + - name: Install client dependencies + run: | + cd client + npm install + cd .. + + client_build: + needs: + - client_dependencies + runs-on: ubuntu-latest + steps: + - name: Build client + run: | + cd client + npm run build + cd .. + + server_dependencies: + needs: + - setup_stage + runs-on: ubuntu-latest + steps: + - name: Install server dependencies + run: | + cd server + npm install + cd .. + + testing: + needs: + - Client-Build + runs-on: ubuntu-latest + steps: + - name: Frontend Tests + if: ${{ github.event_name == 'pull_request' && github.event.pull_request.base.ref == 'master' || github.event_name == 'push' && github.ref == 'refs/heads/master' }} + run: | + cd client + npm run test + cd ..