Merge branch 'main' into 469-security-implementation-2 #7
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: Continuous Integration | ||
run-name: Node.js CI | ||
on: | ||
workflow_call: # required when creating a reusable workflow | ||
jobs: | ||
build-and-test: | ||
runs-on: ubuntu-latestheckout@v3 | ||
steps: | ||
- uses: actions/setup-node@v3 | ||
- name: Use Node.js 18 | ||
uses: actions/setup-node@v3 | ||
with: | ||
node-version: '18.x' | ||
cache: 'npm' | ||
- name: Clean install | ||
run: npm ci | ||
- name: Run linter | ||
run: npm run lint | ||
- name: Compile typescript | ||
run: npm run compile | ||
- name: Jest unit tests | ||
run: npm run test | ||
- name: Test coverage | ||
run: npm run test:coverage | ||
- name: Check for file integrity | ||
run: npm run check-integrity | ||
- name: Build App | ||
run: npm run build --if-present | ||
- name: Deploy | ||
run: npm run deploy | ||
- name: Archive Next.js build | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: next.js-build | ||
path: .next/ | ||
retention-days: 14 | ||
- name: Archive code coverage results | ||
uses: actions/upload-artifact@v3 | ||
with: | ||
name: code-coverage-report |