chore: harden build and deployment workflow
This commit is contained in:
@@ -1,4 +1,4 @@
|
||||
name: Backend tests
|
||||
name: Build and tests
|
||||
|
||||
on:
|
||||
push:
|
||||
@@ -20,10 +20,23 @@ jobs:
|
||||
with:
|
||||
node-version-file: .nvmrc
|
||||
cache: npm
|
||||
cache-dependency-path: backend/package-lock.json
|
||||
cache-dependency-path: |
|
||||
backend/package-lock.json
|
||||
frontend/package-lock.json
|
||||
- name: Install dependencies
|
||||
run: npm ci
|
||||
- name: Audit production dependencies
|
||||
run: npm audit --omit=dev
|
||||
- name: Run backend tests
|
||||
run: npm test
|
||||
- name: Install frontend dependencies
|
||||
working-directory: frontend
|
||||
run: npm ci
|
||||
- name: Audit frontend dependencies
|
||||
working-directory: frontend
|
||||
run: npm audit
|
||||
- name: Build frontend
|
||||
working-directory: frontend
|
||||
run: npm run build
|
||||
- name: Validate deployment script syntax
|
||||
run: bash -n ../install.sh
|
||||
|
||||
Reference in New Issue
Block a user