Skip to content

Commit bb9d573

Browse files
authored
Merge pull request #354 from github/update-v1-094554cf
Merge main into v1
2 parents c2dc865 + 094554c commit bb9d573

15 files changed

+5764
-93
lines changed

.github/workflows/integration-testing.yml

Lines changed: 36 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,27 @@ on:
66
pull_request:
77

88
jobs:
9+
# This job and check-node-modules below dupliacte checks from `pr-checks.yml`.
10+
# We run them here as well to gate the more expensive checks which wouldn't
11+
# even be executing the correct code if these fail.
12+
check-js:
13+
runs-on: ubuntu-latest
14+
15+
steps:
16+
- uses: actions/checkout@v2
17+
- name: Check generated JavaScript
18+
run: .github/workflows/script/check-js.sh
19+
20+
check-node-modules:
21+
runs-on: ubuntu-latest
22+
23+
steps:
24+
- uses: actions/checkout@v2
25+
- name: Check node modules up to date
26+
run: .github/workflows/script/check-node-modules.sh
27+
928
multi-language-repo_test-autodetect-languages:
29+
needs: [check-js, check-node-modules]
1030
runs-on: ubuntu-latest
1131

1232
steps:
@@ -40,6 +60,7 @@ jobs:
4060
fi
4161
4262
multi-language-repo_test-custom-queries-and-remote-config:
63+
needs: [check-js, check-node-modules]
4364
strategy:
4465
fail-fast: false
4566
matrix:
@@ -69,6 +90,7 @@ jobs:
6990

7091
# Currently is not possible to analyze Go in conjunction with other languages in macos
7192
multi-language-repo_test-go-custom-queries:
93+
needs: [check-js, check-node-modules]
7294
strategy:
7395
fail-fast: false
7496
matrix:
@@ -99,6 +121,7 @@ jobs:
99121
TEST_MODE: true
100122

101123
go-custom-tracing:
124+
needs: [check-js, check-node-modules]
102125
strategy:
103126
fail-fast: false
104127
matrix:
@@ -130,6 +153,7 @@ jobs:
130153
TEST_MODE: true
131154

132155
go-custom-tracing-autobuild:
156+
needs: [check-js, check-node-modules]
133157
# No need to test Go autobuild on multiple OSes since
134158
# we're testing Go custom tracing with a manual build on all OSes.
135159
runs-on: ubuntu-latest
@@ -153,6 +177,7 @@ jobs:
153177
TEST_MODE: true
154178

155179
multi-language-repo_rubocop:
180+
needs: [check-js, check-node-modules]
156181
runs-on: ubuntu-latest
157182

158183
steps:
@@ -184,6 +209,7 @@ jobs:
184209
TEST_MODE: true
185210

186211
test-proxy:
212+
needs: [check-js, check-node-modules]
187213
runs-on: ubuntu-latest
188214
container:
189215
image: ubuntu:18.04
@@ -211,6 +237,7 @@ jobs:
211237
TEST_MODE: true
212238

213239
runner-analyze-javascript-ubuntu:
240+
needs: [check-js, check-node-modules]
214241
runs-on: ubuntu-latest
215242

216243
steps:
@@ -237,6 +264,7 @@ jobs:
237264
TEST_MODE: true
238265

239266
runner-analyze-javascript-windows:
267+
needs: [check-js, check-node-modules]
240268
runs-on: windows-latest
241269

242270
steps:
@@ -259,6 +287,7 @@ jobs:
259287
TEST_MODE: true
260288

261289
runner-analyze-javascript-macos:
290+
needs: [check-js, check-node-modules]
262291
runs-on: macos-latest
263292

264293
steps:
@@ -281,6 +310,7 @@ jobs:
281310
TEST_MODE: true
282311

283312
runner-analyze-csharp-ubuntu:
313+
needs: [check-js, check-node-modules]
284314
runs-on: ubuntu-latest
285315

286316
steps:
@@ -315,6 +345,7 @@ jobs:
315345
TEST_MODE: true
316346

317347
runner-analyze-csharp-windows:
348+
needs: [check-js, check-node-modules]
318349
runs-on: windows-latest
319350

320351
steps:
@@ -350,6 +381,7 @@ jobs:
350381
TEST_MODE: true
351382

352383
runner-analyze-csharp-macos:
384+
needs: [check-js, check-node-modules]
353385
runs-on: macos-latest
354386

355387
steps:
@@ -386,6 +418,7 @@ jobs:
386418

387419

388420
runner-analyze-csharp-autobuild-ubuntu:
421+
needs: [check-js, check-node-modules]
389422
runs-on: ubuntu-latest
390423

391424
steps:
@@ -419,6 +452,7 @@ jobs:
419452
TEST_MODE: true
420453

421454
runner-analyze-csharp-autobuild-windows:
455+
needs: [check-js, check-node-modules]
422456
runs-on: windows-latest
423457

424458
steps:
@@ -453,6 +487,7 @@ jobs:
453487
TEST_MODE: true
454488

455489
runner-analyze-csharp-autobuild-macos:
490+
needs: [check-js, check-node-modules]
456491
runs-on: macos-latest
457492

458493
steps:
@@ -487,6 +522,7 @@ jobs:
487522
TEST_MODE: true
488523

489524
runner-upload-sarif:
525+
needs: [check-js, check-node-modules]
490526
runs-on: ubuntu-latest
491527

492528
if: ${{ github.event_name != 'pull_request' || github.event.pull_request.base.repo.id == github.event.pull_request.head.repo.id }}

.github/workflows/pr-checks.yml

Lines changed: 3 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -20,53 +20,18 @@ jobs:
2020
steps:
2121
- uses: actions/checkout@v2
2222
- name: Check generated JavaScript
23-
run: |
24-
# Sanity check that repo is clean to start with
25-
if [ ! -z "$(git status --porcelain)" ]; then
26-
# If we get a fail here then this workflow needs attention...
27-
>&2 echo "Failed: Repo should be clean before testing!"
28-
exit 1
29-
fi
30-
# Wipe the lib directory incase there are extra unnecessary files in there
31-
rm -rf lib
32-
# Generate the JavaScript files
33-
npm run-script build
34-
# Check that repo is still clean
35-
if [ ! -z "$(git status --porcelain)" ]; then
36-
# If we get a fail here then the PR needs attention
37-
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
38-
git status
39-
exit 1
40-
fi
41-
echo "Success: JavaScript files are up to date"
23+
run: .github/workflows/script/check-js.sh
4224

4325
check-node-modules:
4426
runs-on: ubuntu-latest
4527

4628
steps:
4729
- uses: actions/checkout@v2
4830
- name: Check node modules up to date
49-
run: |
50-
# Sanity check that repo is clean to start with
51-
if [ ! -z "$(git status --porcelain)" ]; then
52-
# If we get a fail here then this workflow needs attention...
53-
>&2 echo "Failed: Repo should be clean before testing!"
54-
exit 1
55-
fi
56-
# Reinstall modules and then clean to remove absolute paths
57-
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
58-
npm ci
59-
npm run removeNPMAbsolutePaths
60-
# Check that repo is still clean
61-
if [ ! -z "$(git status --porcelain)" ]; then
62-
# If we get a fail here then the PR needs attention
63-
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci' and 'npm run removeNPMAbsolutePaths' to update"
64-
git status
65-
exit 1
66-
fi
67-
echo "Success: node_modules are up to date"
31+
run: .github/workflows/script/check-node-modules.sh
6832

6933
npm-test:
34+
needs: [check-js, check-node-modules]
7035
strategy:
7136
matrix:
7237
os: [ubuntu-latest,macos-latest]
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
# Sanity check that repo is clean to start with
5+
if [ ! -z "$(git status --porcelain)" ]; then
6+
# If we get a fail here then this workflow needs attention...
7+
>&2 echo "Failed: Repo should be clean before testing!"
8+
exit 1
9+
fi
10+
# Wipe the lib directory incase there are extra unnecessary files in there
11+
rm -rf lib
12+
# Generate the JavaScript files
13+
npm run-script build
14+
# Check that repo is still clean
15+
if [ ! -z "$(git status --porcelain)" ]; then
16+
# If we get a fail here then the PR needs attention
17+
>&2 echo "Failed: JavaScript files are not up to date. Run 'npm run-script build' to update"
18+
git status
19+
exit 1
20+
fi
21+
echo "Success: JavaScript files are up to date"
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
#!/bin/bash
2+
set -eu
3+
4+
# Sanity check that repo is clean to start with
5+
if [ ! -z "$(git status --porcelain)" ]; then
6+
# If we get a fail here then this workflow needs attention...
7+
>&2 echo "Failed: Repo should be clean before testing!"
8+
exit 1
9+
fi
10+
# Reinstall modules and then clean to remove absolute paths
11+
# Use 'npm ci' instead of 'npm install' as this is intended to be reproducible
12+
npm ci
13+
npm run removeNPMAbsolutePaths
14+
# Check that repo is still clean
15+
if [ ! -z "$(git status --porcelain)" ]; then
16+
# If we get a fail here then the PR needs attention
17+
>&2 echo "Failed: node_modules are not up to date. Run 'npm ci' and 'npm run removeNPMAbsolutePaths' to update"
18+
git status
19+
exit 1
20+
fi
21+
echo "Success: node_modules are up to date"

lib/actions-util.js

Lines changed: 1 addition & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)