feat: update packages #418
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: Continuous Integration on Pull Request | |
on: | |
pull_request: | |
branches: [staging, main] | |
jobs: | |
Audit: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetching node version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Verify vulnerabilities | |
run: npm audit | |
Test: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetching node version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Execute test | |
run: npm run test | |
env: | |
APP_NAME: auth-plus-authentication | |
- name: SonarCloud Scan | |
uses: sonarsource/sonarcloud-github-action@master | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} | |
- name: Code Climate Scan | |
uses: paambaati/codeclimate-action@v3.2.0 | |
env: | |
CC_TEST_REPORTER_ID: ${{ secrets.CODECLIMATE_TOKEN }} | |
with: | |
coverageLocations: ${{github.workspace}}/coverage/lcov.info:lcov | |
- name: Codacy Scan | |
uses: codacy/codacy-coverage-reporter-action@v1.3.0 | |
with: | |
project-token: ${{ secrets.CODACY_PROJECT_TOKEN }} | |
coverage-reports: ./coverage/lcov.info | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetching node version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Verify build | |
run: npm run build -- --noEmit | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repo | |
uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
- name: Fetching node version | |
run: echo "NODE_VERSION=$(cat .nvmrc)" >> $GITHUB_OUTPUT | |
id: nvm | |
- name: Use Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ steps.nvm.outputs.NODE_VERSION }} | |
- name: Install dependencies | |
run: npm ci | |
- name: Verify build | |
run: npm run build -- --noEmit |