fix(deps): update nest monorepo to v11 (major) #1315
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: CI | |
on: [pull_request] | |
jobs: | |
lint-and-build: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- run: npm install | |
- run: npm run prettier | |
- run: npm run lint | |
- run: npm run build | |
- run: docker build . -t nestjs-playground | |
test: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
branch: [main, branch] | |
fail-fast: false | |
steps: | |
- uses: actions/checkout@v4 | |
if: matrix.branch == 'branch' | |
- uses: actions/checkout@v4 | |
if: matrix.branch == 'main' | |
with: | |
ref: main | |
- name: Use Node.js | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 21 | |
- run: npm install | |
- name: Run test | |
run: | | |
npm run test -- --maxWorkers=2 --coverage --testLocationInResults --json --outputFile=report-${{ matrix.branch }}.json | |
- name: Archive code coverage results | |
uses: actions/upload-artifact@v4 | |
with: | |
name: code-coverage-report-${{ matrix.branch }} | |
path: report-${{ matrix.branch }}.json | |
test-coverage: | |
runs-on: ubuntu-latest | |
needs: [test] | |
steps: | |
- name: Download branch code coverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: code-coverage-report-branch | |
path: . | |
- name: Download main codecoverage | |
uses: actions/download-artifact@v4 | |
with: | |
name: code-coverage-report-main | |
path: . | |
- name: Test and coverage | |
uses: artiomtr/[email protected] | |
with: | |
working-directory: . | |
coverage-file: ./report-branch.json | |
base-coverage-file: ./report-main.json |