-
Notifications
You must be signed in to change notification settings - Fork 0
157 lines (149 loc) · 4.5 KB
/
main.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
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
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
name: Main
on:
push:
defaults:
run:
shell: bash
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
env:
DEFAULT_BRANCH: main
permissions: read-all
jobs:
changelog:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup rushjs
uses: ./.github/actions/setup-rush
with:
build: true
build-cache: true
- name: Checking for missing changelogs
uses: ./.github/actions/run-rush
with:
command: change
args: --verify
spellcheck:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Running cspell
uses: streetsidesoftware/cspell-action@v5
with:
config: ".github/linters/cspell.json"
# Log progress and other information during the action execution.
verbose: true
# Determines if the action should be failed
# if any spelling issues are found.
strict: true
# Limit the files checked to the ones in the pull request or push.
# We will enabled this only if this job tooks more than 3 minutes
incremental_files_only: false
# Notification level to use with inline reporting of spelling errors.
# Allowed values are: warning, error, none
inline: warning
licensecheck:
runs-on: ubuntu-latest
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Scanning dependencies
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
- name: Testing dependencies
uses: fossas/fossa-action@main
with:
api-key: ${{ secrets.FOSSA_API_KEY }}
run-tests: true
lintcheck:
runs-on: ubuntu-latest
permissions:
contents: write
statuses: write
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Linting
## https://github.com/super-linter/super-linter#slim-image
uses: super-linter/super-linter/slim@v7
env:
DEFAULT_BRANCH: ${{ env.DEFAULT_BRANCH }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
IGNORE_GITIGNORED_FILES: true
IGNORE_GENERATED_FILES: true
# For markdownlint, as it cannot exclude file from config file
# exclude reviews file because it autogen file
FILTER_REGEX_EXCLUDE: common/reviews/api/*
VALIDATE_ALL_CODEBASE: false
VALIDATE_CHECKOV: true
VALIDATE_EDITORCONFIG: true
VALIDATE_ENV: true
VALIDATE_GITHUB_ACTIONS: true
VALIDATE_GITLEAKS: true
VALIDATE_NATURAL_LANGUAGE: true
VALIDATE_BASH: true
VALIDATE_BASH_EXEC: true
VALIDATE_SHELL_SHFMT: true
VALIDATE_XML: true
VALIDATE_JSON_PRETTIER: true
VALIDATE_JSONC: true
VALIDATE_MARKDOWN_PRETTIER: true
VALIDATE_MARKDOWN: true
VALIDATE_YAML: true
YAML_CONFIG_FILE: .yamllint.yml
YAML_ERROR_ON_WARNING: true
testing:
runs-on: ubuntu-latest
needs:
- changelog
steps:
- name: Checkout source code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup rushjs
uses: ./.github/actions/setup-rush
with:
build: true
build-cache: true
- name: Testing packages
uses: ./.github/actions/run-rush
with:
command: test
- name: Analysis packages
uses: SonarSource/sonarcloud-github-action@v3.0.0
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
alternative-testing:
runs-on: ubuntu-latest
strategy:
matrix:
# Support backward 'LTS' version and 'current' version
# https://github.com/nodejs/release#release-schedule
# https://nodejs.org/en/blog/release
node-version: [18, 20]
needs:
- testing
steps:
- name: Checkout source code
uses: actions/checkout@v4
- name: Setup rushjs
uses: ./.github/actions/setup-rush
with:
node-version: ${{ matrix.node-version }}
build: true
build-cache: true
- name: Testing packages
uses: ./.github/actions/run-rush
with:
command: test