Skip to content

Quality

Quality #1240

Workflow file for this run

name: 'Quality'
on:
workflow_dispatch:
schedule:
- cron: '0 8 * * *'
jobs:
build:
runs-on: ubuntu-latest
strategy:
matrix:
node: ['20.19.4', '22.18.0', '24.6.0']
name: 'Build'
steps:
- name: '⚙ Setup NodeJS v${{ matrix.node }}'
uses: actions/[email protected]
with:
node-version: ${{ matrix.node }}
- name: '✅ Checkout repository'
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: '💾 Restore Dependencies from cache'
uses: actions/[email protected]
with:
path: |
node_modules
*/*/node_modules
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
restore-keys: |
${{ runner.os }}-yarn-
- name: '🦉 GitGuardian scan'
uses: GitGuardian/[email protected]
env:
GITHUB_PUSH_BEFORE_SHA: ${{ github.event.before }}
GITHUB_PUSH_BASE_SHA: ${{ github.event.base }}
GITHUB_PULL_BASE_SHA: ${{ github.event.pull_request.base.sha }}
GITHUB_DEFAULT_BRANCH: ${GITHUB_REF##*/}
GITGUARDIAN_API_KEY: ${{ secrets.GITGUARDIAN_API_KEY }}
- name: '📦 Install packages'
run: yarn install
- name: '💅 Lint'
run: yarn lint:format:check
- name: '🔨 Build'
run: yarn build
- name: '👨‍💻 Run Test'
run: yarn test
env:
NODE_ENV: 'test'
- name: '📊 Publish Test Report'
uses: dorny/test-reporter@v2
if: ${{ !cancelled() }}
with:
name: 'Test Report (${{ matrix.node }})'
path: 'junit.xml'
reporter: jest-junit
- name: '📊 Upload coverage report to Codecov'
uses: codecov/[email protected]
with:
token: ${{ secrets.CODECOV_TOKEN }}
- name: '📊 SonarCloud Scan'
uses: sonarsource/[email protected]
with:
args: >
-Dsonar.organization=${{ github.repository_owner }}
-Dsonar.projectKey=${{ github.repository_owner }}_${{ github.event.repository.name }}
-Dsonar.projectName=${{ github.repository_owner }}_${{ github.event.repository.name }}
-Dsonar.projectVersion=1.0
-Dsonar.sourceEncoding=UTF-8
-Dsonar.sources=./src
-Dsonar.exclusions=**/*.bin,node_modules/**,test/**,**/__test__/**,**/__mocks__/**,src/main.ts
-Dsonar.coverage.exclusions=node_modules/**,test/**,**/__test__/**,**/__mocks__/**,src/main.ts
-Dsonar.testExecutionReportPaths=test-report.xml
-Dsonar.javascript.lcov.reportPaths=./coverage/lcov.info
env:
GITHUB_TOKEN: ${{ secrets.GH_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
#- name: "🦠 Snyk to check for vulnerabilities"
# uses: snyk/actions/node@master
# env:
# SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}