-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (41 loc) · 1.37 KB
/
CI Pipeline.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: CI Pipeline
on: [push]
jobs:
build-test-scan:
runs-on: ubuntu-latest
steps:
- name: Get the codebase from the git repo
uses: actions/checkout@v3
- name: Install nodejs
uses: actions/setup-node@v3
with:
node-version: '16'
- name: Install dependencies
run: npm ci
- name: Check code quality (ESLint)
run: |
npm run lint
npm run ci:lint
- name: Run tests
run: npm run test:ci:sonar
- name: Run build
run: npm run build
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
with:
args: >
-Dsonar.organization=planet
-Dsonar.projectKey=commerceTools
-Dsonar.sources=.
-Dsonar.testExecutionReportPaths=coverage/test-report.xml
-Dsonar.tests=test
-Dsonar.test.inclusions=test/**
-Dsonar.typescript.tsconfigPath=tsconfig.json
-Dsonar.eslint.reportPaths=coverage/lint-result.json
-Dsonar.language=js
-Dsonar.sourceEncoding=UTF-8
env:
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_HOST_URL: ${{ secrets.SONAR_HOST_URL }}
- name: Look at the build result
run: find ./dist -name "*.js" -print