-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
60 additions
and
25 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,29 +1,64 @@ | ||
name: main | ||
|
||
on: [push, pull_request] | ||
on: | ||
- push | ||
- pull_request | ||
|
||
jobs: | ||
build: | ||
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' | ||
|
||
- name: Install client dependencies | ||
run: cd client && npm install && cd .. | ||
|
||
- name: Install server dependencies | ||
run: cd server && npm install && cd .. | ||
|
||
- name: Build client | ||
run: cd client && npm run build && cd .. | ||
|
||
- 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: | ||
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 .. |