von dutch cult classic in ur eardrums #160
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
name: Node Js | |
on: [push] | |
jobs: | |
build-frontend: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Run npm start and build | |
working-directory: frontend/public | |
run: | | |
npm install react-scripts | |
npm start | |
npm run build | |
run-backend: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Clean install dependencies | |
run: | | |
Remove-Item node_modules -Force -Recurse -ErrorAction Ignore | |
Remove-Item package-lock.json -Force -ErrorAction Ignore | |
npm install | |
- name: Start the backend server | |
run: | | |
npm ci | |
node "backend\server.js" | |
timeout-minutes: 10 | |
run-tests: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
cache: 'npm' | |
- name: Clean install dependencies | |
run: | | |
Remove-Item node_modules -Force -Recurse -ErrorAction Ignore | |
Remove-Item package-lock.json -Force -ErrorAction Ignore | |
npm install | |
- name: Run tests | |
run: npm test "frontend\src\AppTest.js" |