-
Notifications
You must be signed in to change notification settings - Fork 0
92 lines (79 loc) · 2.27 KB
/
quality-check-kdl-server-ui.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
name: "[QA] Quality Checks UI"
on:
workflow_dispatch:
pull_request:
types: [opened, synchronize, reopened]
paths:
- 'app/ui/*'
push:
paths:
- 'app/ui/*'
jobs:
quality-checks:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: read
checks: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Setup Node
uses: actions/setup-node@v4
with:
node-version: ${{ vars.NODE_VERSION_UI_TESTS }}
cache: yarn
cache-dependency-path: app/ui/yarn.lock
- name: Run UI ESLinter
working-directory: ./app/ui
run: |
yarn install
yarn run lint
- name: UI Run tests
working-directory: ./app/ui
run: |
yarn install
yarn run test:cov:sonar
- name: UI Archive code coverage results
uses: actions/upload-artifact@v4
with:
name: coverage-report
path: |
./app/ui/coverage
./app/ui/test-report.xml
- name: UI Run e2e tests
uses: cypress-io/github-action@v6
with:
browser: chrome
tag: node-${{ vars.NODE_VERSION_UI_TESTS }}
wait-on: 'http://localhost:3001'
wait-on-timeout: 120
working-directory: ./app/ui
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
needs: quality-checks
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
persist-credentials: false
- name: Download code coverage results
uses: actions/download-artifact@v4
with:
name: coverage-report
path: app/ui
- name: Fix code coverage paths
working-directory: app/ui
run: |
sed -i 's|/home/runner/work/kdl-server/kdl-server/|/github/workspace/|g' coverage/lcov.info
sed -i 's|/home/runner/work/kdl-server/kdl-server/|/github/workspace/|g' test-report.xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
with:
projectBaseDir: app/ui