Skip to content

Commit 3d76c4b

Browse files
committed
On branch edburns/dd-2855288-add-smoke-test-to-build-and-test
modified: .github/workflows/run-smoke-test.yml modified: pom.xml @Copilot wrote: > mvn -DskipTests clean install will still execute generate-test-resources, which in this repo runs a git clone of github/copilot-sdk and an npm install (see pom.xml plugin executions bound to generate-test-resources). This adds extra network + npm variability to what is otherwise just an SDK install step. Consider adding a dedicated Maven profile/flag to skip those test-harness setup executions for this workflow, so the smoke test depends only on building/installing the SDK artifact. This is an excellent suggestion.
1 parent 1927235 commit 3d76c4b

File tree

2 files changed

+12
-1
lines changed

2 files changed

+12
-1
lines changed

.github/workflows/run-smoke-test.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@ jobs:
2323
- uses: ./.github/actions/setup-copilot
2424

2525
- name: Build SDK and install to local repo
26-
run: mvn -DskipTests clean install
26+
run: mvn -DskipTests -Pskip-test-harness clean install
2727

2828
- name: Create and run smoke test via Copilot CLI
2929
env:

pom.xml

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,8 @@
4949
<!-- Directory where the copilot-sdk repo will be cloned for tests -->
5050
<copilot.sdk.clone.dir>${project.build.directory}/copilot-sdk</copilot.sdk.clone.dir>
5151
<copilot.tests.dir>${copilot.sdk.clone.dir}/test</copilot.tests.dir>
52+
<!-- Set to true (via -Pskip-test-harness) to skip git-clone + npm install of test harness -->
53+
<skip.test.harness>false</skip.test.harness>
5254
</properties>
5355

5456
<dependencies>
@@ -140,6 +142,7 @@
140142
<goal>run</goal>
141143
</goals>
142144
<configuration>
145+
<skip>${skip.test.harness}</skip>
143146
<target xmlns:if="ant:if" xmlns:unless="ant:unless">
144147
<!-- Load the target commit from .lastmerge file -->
145148
<loadfile property="copilot.sdk.commit" srcFile="${project.basedir}/.lastmerge">
@@ -221,6 +224,7 @@
221224
<goal>exec</goal>
222225
</goals>
223226
<configuration>
227+
<skip>${skip.test.harness}</skip>
224228
<executable>npm</executable>
225229
<workingDirectory>${copilot.sdk.clone.dir}/test/harness</workingDirectory>
226230
<arguments>
@@ -533,6 +537,13 @@
533537
</reporting>
534538

535539
<profiles>
540+
<!-- Skip git-clone + npm install of the copilot-sdk test harness -->
541+
<profile>
542+
<id>skip-test-harness</id>
543+
<properties>
544+
<skip.test.harness>true</skip.test.harness>
545+
</properties>
546+
</profile>
536547
<!-- Debug profile for FINE logging during tests -->
537548
<profile>
538549
<id>debug</id>

0 commit comments

Comments
 (0)