-
Notifications
You must be signed in to change notification settings - Fork 413
136 lines (120 loc) · 4.26 KB
/
Copy pathwebapp.yml
File metadata and controls
136 lines (120 loc) · 4.26 KB
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
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
name: "Webapp"
on:
push:
branches: [ '**' ]
jobs:
build:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
node-version: [ 22, 24 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=webapp...
- name: Build
shell: bash
run: pnpm nx run webapp:build
test:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
node-version: [ 22, 24 ]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=webapp...
- name: "Lint"
shell: bash
run: pnpm nx run webapp:lint
- name: "Type check"
shell: bash
run: pnpm nx run webapp:type-check
- name: "Test"
shell: bash
run: pnpm nx run webapp:test --watchAll=false --maxWorkers=20% --coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: env.SONAR_ORGANIZATION != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
SONAR_WEBAPP_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_PROJECT_KEY }}
with:
projectBaseDir: packages/webapp
test-lib:
runs-on: ubuntu-24.04
strategy:
fail-fast: false
matrix:
node-version: [ 22, 24 ]
webapp-lib-name:
- webapp-core
- webapp-api-client
- webapp-contentful
- webapp-crud-demo
- webapp-documents
- webapp-notifications
- webapp-emails
- webapp-finances
- webapp-generative-ai
- webapp-tenants
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0
- uses: ./.github/workflows/actions/setup
with:
node-version: ${{ matrix.node-version }}
- shell: bash
run: pnpm install
--include-workspace-root
--frozen-lockfile
--filter=${{ matrix.webapp-lib-name }}...
- name: "${{ matrix.webapp-lib-name }}: Lint"
shell: bash
run: pnpm nx run ${{ matrix.webapp-lib-name }}:lint
- name: "${{ matrix.webapp-lib-name }}: Type check"
shell: bash
run: pnpm nx run ${{ matrix.webapp-lib-name }}:type-check
- name: "${{ matrix.webapp-lib-name }}: Test"
shell: bash
run: pnpm nx run ${{ matrix.webapp-lib-name }}:test --watchAll=false --maxWorkers=20% --coverage
- name: SonarCloud Scan
uses: sonarsource/sonarcloud-github-action@master
if: env.SONAR_ORGANIZATION != ''
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
SONAR_ORGANIZATION: ${{ vars.SONAR_ORGANIZATION }}
SONAR_WEBAPP_API_CLIENT_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_API_CLIENT_PROJECT_KEY }}
SONAR_WEBAPP_CONTENTFUL_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_CONTENTFUL_PROJECT_KEY }}
SONAR_WEBAPP_CORE_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_CORE_PROJECT_KEY }}
SONAR_WEBAPP_CRUD_DEMO_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_CRUD_DEMO_PROJECT_KEY }}
SONAR_WEBAPP_DOCUMENTS_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_DOCUMENTS_PROJECT_KEY }}
SONAR_WEBAPP_EMAILS_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_EMAILS_PROJECT_KEY }}
SONAR_WEBAPP_FINANCES_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_FINANCES_PROJECT_KEY }}
SONAR_WEBAPP_GENERATIVE_AI_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_GENERATIVE_AI_PROJECT_KEY }}
SONAR_WEBAPP_NOTIFICATIONS_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_NOTIFICATIONS_PROJECT_KEY }}
SONAR_WEBAPP_TENANTS_PROJECT_KEY: ${{ vars.SONAR_WEBAPP_TENANTS_PROJECT_KEY }}
with:
projectBaseDir: "packages/webapp-libs/${{ matrix.webapp-lib-name }}"