Skip to content

Update to angular 18 #218

Update to angular 18

Update to angular 18 #218

Workflow file for this run

---
name: code-and-dependencies-analysis
on:
pull_request:
types:
- opened
- synchronize
- reopened
- ready_for_review
jobs:
verify:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: 16.x
cache: "npm"
- name: Install project
run: npm ci
- name: Verify project
run: npm run test-ci
- name: Jest coverage comment
uses: MishaKav/jest-coverage-comment@main
- name: Build project
run: npm run build
- name: Get branch name
id: branch-name
uses: tj-actions/branch-names@v6
- name: Analyze build code
uses: sonarsource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
args: >
-Dsonar.organization=littil
-Dsonar.projectKey=littil-frontend
-Dsonar.sources=src/app
-Dsonar.tests=src/app
-Dsonar.test.inclusions=**/*.spec.ts
-Dsonar.branch.target=${{ steps.branch-name.outputs.base_ref_branch}}
-Dsonar.branch.name=${{ steps.branch-name.outputs.head_ref_branch }}
security-scan:
if: github.event.pull_request.draft == false
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Run Snyk to check for vulnerabilities
uses: snyk/actions/node@master
env:
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
continue-on-error: true
with:
command: test --severity-threshold=high --sarif-file-output=snyk-report/snyk.sarif
- name: Upload result to GitHub Code Scanning
uses: github/codeql-action/upload-sarif@v3
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SNYK_TOKEN: ${{ secrets.SNYK_TOKEN }}
with:
sarif_file: snyk-report/snyk.sarif
category: Snyk