Skip to content

Commit

Permalink
Update main.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
nelsontr authored Oct 30, 2023
1 parent e66b20b commit 49c9a86
Showing 1 changed file with 40 additions and 8 deletions.
48 changes: 40 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ name: main
on: [push, pull_request]

jobs:
build:
setup_stage:
runs-on: ubuntu-latest

steps:
Expand All @@ -13,17 +13,49 @@ jobs:
- name: Setup Node
uses: actions/setup-node@v3.8.2
with:
node-version: '16'
node-version: "16"

client_dependencies:
needs:
- setup_stage
runs-on: ubuntu-latest
steps:
- name: Install client dependencies
run: cd client && npm install && cd ..
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 ..
run: |
cd server
npm install
cd ..
- name: Build client
run: cd client && npm run build && 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 ..
run: |
cd client
npm run test
cd ..

0 comments on commit 49c9a86

Please sign in to comment.