Skip to content

Commit 2b44ae9

Browse files
committed
Increase parallelism in smoketest yaml + reduce iterations in PR
1 parent bcf8390 commit 2b44ae9

1 file changed

Lines changed: 6 additions & 3 deletions

File tree

.github/workflows/smoke-test.yml

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ on:
88
branches:
99
- main
1010
pull_request:
11+
paths:
12+
- "src/**"
1113
schedule:
1214
- cron: "0 0 * * *" # every day at midnight
1315

@@ -16,7 +18,7 @@ permissions:
1618

1719
jobs:
1820
smoke-test:
19-
if: github.repository == 'microsoft/component-detection'
21+
if: github.repository == 'microsoft/component-detection' && (github.event_name != 'pull_request' || github.event.pull_request.draft == false)
2022
runs-on: ["self-hosted", "1ES.Pool=1ES-OSE-GH-Pool"]
2123
strategy:
2224
matrix:
@@ -36,7 +38,7 @@ jobs:
3638
{ name: "Yarn", repo: "gatsbyjs/gatsby" },
3739
]
3840
fail-fast: false
39-
max-parallel: 4 # limit the total number of running jobs to avoid rate limiting
41+
max-parallel: 6
4042
name: ${{ matrix.language.name }}
4143
steps:
4244
- name: Harden Runner
@@ -82,7 +84,8 @@ jobs:
8284
- name: Run Smoke Test
8385
working-directory: src/Microsoft.ComponentDetection
8486
run: |
85-
for i in $(seq 1 10); do
87+
ITERATIONS=${{ github.event_name == 'schedule' && 10 || 1 }}
88+
for i in $(seq 1 $ITERATIONS); do
8689
dotnet run -c Release -- scan --SourceDirectory ${{ github.workspace }}/smoke-test-repo --Verbosity Verbose || exit 1
8790
done
8891

0 commit comments

Comments
 (0)