defining client and server docker files #19
Workflow file for this run
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: Server | |
on: | |
push: | |
# trigger on pull requests | |
pull_request: | |
branches: | |
- main | |
path: | |
- .github/workflows/server.yml | |
- server/** | |
# only trigger build for specific paths | |
paths: | |
- .github/workflows/server.yml | |
- server/** | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-node@v4 | |
with: | |
node-version: 20.16.0 | |
- name: Cache Dependencies | |
id: cache | |
uses: actions/cache@v4 | |
env: | |
cache-name: cache-server-node-modules | |
with: | |
path: server/node_modules | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('server/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- name: Install Dependencies | |
if: ${{ steps.cache.outputs.cache-hit != 'true' }} | |
working-directory: ./server | |
run: npm ci | |
- name: List Node Modules | |
working-directory: ./server | |
run: npm list | |
- name: Run Server Tests | |
working-directory: ./server | |
run: npm run test |