Bump ngx-cookie-service from 16.0.0 to 16.1.0 in /client #658
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: Tests | |
on: [push, pull_request] | |
permissions: | |
contents: 'read' | |
pull-requests: 'write' | |
jobs: | |
test-api: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./server | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- name: Cache API node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-api-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci | |
- name: Test | |
run: npm test | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: api-coverage | |
path: ./server/coverage | |
retention-days: 1 | |
test-frontend: | |
runs-on: ubuntu-latest | |
defaults: | |
run: | |
working-directory: ./client | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
registry-url: https://registry.npmjs.org/ | |
- name: Cache front end node modules | |
id: cache-npm | |
uses: actions/cache@v3 | |
env: | |
cache-name: cache-front-end-node-modules | |
with: | |
# npm cache files are stored in `~/.npm` on Linux/macOS | |
path: ~/.npm | |
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }} | |
restore-keys: | | |
${{ runner.os }}-build-${{ env.cache-name }}- | |
${{ runner.os }}-build- | |
${{ runner.os }}- | |
- if: ${{ steps.cache-npm.outputs.cache-hit != 'true' }} | |
name: List the state of node modules | |
continue-on-error: true | |
run: npm list | |
- name: Install dependencies | |
run: npm ci | |
- name: Test | |
run: npm run test:ci | |
- name: Upload coverage report | |
uses: actions/upload-artifact@v3 | |
with: | |
name: frontend-coverage | |
path: ./client/coverage | |
retention-days: 1 | |
coverage-report: | |
name: Generate coverage report | |
needs: [test-api, test-frontend] | |
runs-on: ubuntu-latest | |
if: ${{ github.event_name == 'pull_request' }} | |
defaults: | |
run: | |
working-directory: ./ | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Download API coverage results | |
uses: actions/download-artifact@v3 | |
with: | |
name: api-coverage | |
path: coverage/api | |
- name: Download Frontend coverage results | |
uses: actions/download-artifact@v3 | |
with: | |
name: frontend-coverage | |
path: coverage/frontend | |
- name: Setup LCOV | |
run: sudo apt-get -y install lcov | |
shell: bash | |
- name: Report API code coverage | |
uses: zgosalvez/github-actions-report-lcov@v3 | |
with: | |
coverage-files: coverage/api/lcov.info | |
artifact-name: api-code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
update-comment: true | |
title-prefix: API Coverage | |
working-directory: ./server | |
- name: Report website code coverage | |
uses: zgosalvez/github-actions-report-lcov@v3 | |
with: | |
coverage-files: coverage/frontend/lcov.info | |
artifact-name: frontend-code-coverage-report | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
update-comment: true | |
title-prefix: Website Coverage | |
working-directory: ./client |