Skip to content

Commit b004bb4

Browse files
committed
Add PR check for direct tracing with custom working directory
1 parent 6d62742 commit b004bb4

File tree

2 files changed

+126
-0
lines changed

2 files changed

+126
-0
lines changed

.github/workflows/__autobuild-direct-tracing-with-working-dir.yml

Lines changed: 92 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 34 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,34 @@
1+
name: "Autobuild direct tracing (custom working directory)"
2+
description: >
3+
An end-to-end integration test of a Java repository built using 'build-mode: autobuild',
4+
with direct tracing enabled and a custom working directory specified as the input to the
5+
autobuild Action.
6+
operatingSystems: ["ubuntu", "windows"]
7+
versions: ["linked", "nightly-latest"]
8+
env:
9+
CODEQL_ACTION_AUTOBUILD_BUILD_MODE_DIRECT_TRACING: true
10+
steps:
11+
- name: Test setup
12+
shell: bash
13+
run: |
14+
# Make sure that Gradle build succeeds in autobuild-dir ...
15+
cp -a ../action/tests/java-repo autobuild-dir
16+
# ... and fails if attempted in the current directory
17+
echo > build.gradle
18+
- uses: ./../action/init
19+
with:
20+
build-mode: autobuild
21+
languages: java
22+
tools: ${{ steps.prepare-test.outputs.tools-url }}
23+
- name: Check that indirect tracing is disabled
24+
shell: bash
25+
run: |
26+
if [[ ! -z "${CODEQL_RUNNER}" ]]; then
27+
echo "Expected indirect tracing to be disabled, but the" \
28+
"CODEQL_RUNNER environment variable is set."
29+
exit 1
30+
fi
31+
- uses: ./../action/autobuild
32+
with:
33+
working-directory: autobuild-dir
34+
- uses: ./../action/analyze

0 commit comments

Comments
 (0)