Skip to content

Commit 5275533

Browse files
Merge branch '16.x.x' into testing-graphql-servers
2 parents 989a0dd + 3de02c1 commit 5275533

33 files changed

+1689
-595
lines changed

.github/workflows/ci.yml

Lines changed: 72 additions & 22 deletions
Original file line numberDiff line numberDiff line change
@@ -4,18 +4,21 @@ on:
44
secrets:
55
codecov_token:
66
required: true
7+
permissions: {}
78
jobs:
89
lint:
910
name: Lint source files
1011
runs-on: ubuntu-latest
12+
permissions:
13+
contents: read # for actions/checkout
1114
steps:
1215
- name: Checkout repo
13-
uses: actions/checkout@v2
16+
uses: actions/checkout@v4
1417
with:
1518
persist-credentials: false
1619

1720
- name: Setup Node.js
18-
uses: actions/setup-node@v2
21+
uses: actions/setup-node@v4
1922
with:
2023
cache: npm
2124
node-version-file: '.node-version'
@@ -35,43 +38,59 @@ jobs:
3538
- name: Spellcheck
3639
run: npm run check:spelling
3740

41+
- name: Lint GitHub Actions
42+
uses: docker://rhysd/actionlint:latest
43+
with:
44+
args: -color
45+
3846
checkForCommonlyIgnoredFiles:
3947
name: Check for commonly ignored files
4048
runs-on: ubuntu-latest
49+
permissions:
50+
contents: read # for actions/checkout
4151
steps:
4252
- name: Checkout repo
43-
uses: actions/checkout@v2
53+
uses: actions/checkout@v4
4454
with:
4555
persist-credentials: false
4656

4757
- name: Check if commit contains files that should be ignored
4858
run: |
49-
git clone --depth 1 https://github.com/github/gitignore.git &&
50-
cat gitignore/Node.gitignore $(find gitignore/Global -name "*.gitignore" | grep -v ModelSim) > all.gitignore &&
51-
if [[ "$(git ls-files -iX all.gitignore)" != "" ]]; then
52-
echo "::error::Please remove these files:"
53-
git ls-files -iX all.gitignore
59+
git clone --depth 1 https://github.com/github/gitignore.git
60+
61+
rm gitignore/Global/ModelSim.gitignore
62+
rm gitignore/Global/Images.gitignore
63+
cat gitignore/Node.gitignore gitignore/Global/*.gitignore > all.gitignore
64+
65+
IGNORED_FILES=$(git ls-files --cached --ignored --exclude-from=all.gitignore)
66+
if [[ "$IGNORED_FILES" != "" ]]; then
67+
echo -e "::error::Please remove these files:\n$IGNORED_FILES" | sed -z 's/\n/%0A/g'
5468
exit 1
5569
fi
5670
5771
checkPackageLock:
5872
name: Check health of package-lock.json file
5973
runs-on: ubuntu-latest
74+
permissions:
75+
contents: read # for actions/checkout
6076
steps:
6177
- name: Checkout repo
62-
uses: actions/checkout@v2
78+
uses: actions/checkout@v4
6379
with:
6480
persist-credentials: false
6581

6682
- name: Setup Node.js
67-
uses: actions/setup-node@v2
83+
uses: actions/setup-node@v4
6884
with:
6985
cache: npm
7086
node-version-file: '.node-version'
7187

7288
- name: Install Dependencies
7389
run: npm ci --ignore-scripts
7490

91+
- name: Check that package-lock.json doesn't have conflicts
92+
run: npm ls --depth 999
93+
7594
- name: Run npm install
7695
run: npm install --ignore-scripts --force --package-lock-only --engine-strict --strict-peer-deps
7796

@@ -81,14 +100,16 @@ jobs:
81100
integrationTests:
82101
name: Run integration tests
83102
runs-on: ubuntu-latest
103+
permissions:
104+
contents: read # for actions/checkout
84105
steps:
85106
- name: Checkout repo
86-
uses: actions/checkout@v2
107+
uses: actions/checkout@v4
87108
with:
88109
persist-credentials: false
89110

90111
- name: Setup Node.js
91-
uses: actions/setup-node@v2
112+
uses: actions/setup-node@v4
92113
with:
93114
node-version-file: '.node-version'
94115
# We install bunch of packages during integration tests without locking them
@@ -103,14 +124,16 @@ jobs:
103124
fuzz:
104125
name: Run fuzzing tests
105126
runs-on: ubuntu-latest
127+
permissions:
128+
contents: read # for actions/checkout
106129
steps:
107130
- name: Checkout repo
108-
uses: actions/checkout@v2
131+
uses: actions/checkout@v4
109132
with:
110133
persist-credentials: false
111134

112135
- name: Setup Node.js
113-
uses: actions/setup-node@v2
136+
uses: actions/setup-node@v4
114137
with:
115138
cache: npm
116139
node-version-file: '.node-version'
@@ -126,12 +149,12 @@ jobs:
126149
runs-on: ubuntu-latest
127150
steps:
128151
- name: Checkout repo
129-
uses: actions/checkout@v2
152+
uses: actions/checkout@v4
130153
with:
131154
persist-credentials: false
132155

133156
- name: Setup Node.js
134-
uses: actions/setup-node@v2
157+
uses: actions/setup-node@v4
135158
with:
136159
cache: npm
137160
node-version-file: '.node-version'
@@ -156,14 +179,16 @@ jobs:
156179
strategy:
157180
matrix:
158181
node_version_to_setup: [12, 14, 16, 17]
182+
permissions:
183+
contents: read # for actions/checkout
159184
steps:
160185
- name: Checkout repo
161-
uses: actions/checkout@v2
186+
uses: actions/checkout@v4
162187
with:
163188
persist-credentials: false
164189

165190
- name: Setup Node.js v${{ matrix.node_version_to_setup }}
166-
uses: actions/setup-node@v2
191+
uses: actions/setup-node@v4
167192
with:
168193
cache: npm
169194
node-version: ${{ matrix.node_version_to_setup }}
@@ -174,18 +199,40 @@ jobs:
174199
- name: Run Tests
175200
run: npm run testonly
176201

202+
codeql:
203+
name: Run CodeQL security scan
204+
runs-on: ubuntu-latest
205+
permissions:
206+
contents: read # for actions/checkout
207+
security-events: write # for codeql-action
208+
steps:
209+
- name: Checkout repo
210+
uses: actions/checkout@v4
211+
with:
212+
persist-credentials: false
213+
214+
- name: Initialize CodeQL
215+
uses: github/codeql-action/init@v3
216+
with:
217+
languages: 'javascript, typescript'
218+
219+
- name: Perform CodeQL analysis
220+
uses: github/codeql-action/analyze@v3
221+
177222
build-npm-dist:
178223
name: Build 'npmDist' artifact
179224
runs-on: ubuntu-latest
180225
needs: [test, fuzz, lint, integrationTests]
226+
permissions:
227+
contents: read # for actions/checkout
181228
steps:
182229
- name: Checkout repo
183-
uses: actions/checkout@v2
230+
uses: actions/checkout@v4
184231
with:
185232
persist-credentials: false
186233

187234
- name: Setup Node.js
188-
uses: actions/setup-node@v2
235+
uses: actions/setup-node@v4
189236
with:
190237
cache: npm
191238
node-version-file: '.node-version'
@@ -206,15 +253,18 @@ jobs:
206253
name: Build 'denoDist' artifact
207254
runs-on: ubuntu-latest
208255
needs: [test, fuzz, lint, integrationTests]
256+
permissions:
257+
contents: read # for actions/checkout
209258
steps:
210259
- name: Checkout repo
211-
uses: actions/checkout@v2
260+
uses: actions/checkout@v4
212261
with:
213262
persist-credentials: false
214263

215264
- name: Setup Node.js
216-
uses: actions/setup-node@v2
265+
uses: actions/setup-node@v4
217266
with:
267+
cache: npm
218268
node-version-file: '.node-version'
219269

220270
- name: Install Dependencies

.github/workflows/cmd-publish-pr-on-npm.yml

Lines changed: 0 additions & 116 deletions
This file was deleted.

.github/workflows/cmd-run-benchmark.yml

Lines changed: 0 additions & 48 deletions
This file was deleted.

0 commit comments

Comments
 (0)