Skip to content

Commit f3ced61

Browse files
committed
Add PR checks for other build modes
1 parent 0ab8e2a commit f3ced61

File tree

15 files changed

+240
-0
lines changed

15 files changed

+240
-0
lines changed

.github/workflows/__build-mode-autobuild.yml

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

.github/workflows/__build-mode-manual.yml

Lines changed: 90 additions & 0 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
name: "Build mode autobuild"
2+
description: "An end-to-end integration test of a Java repository built using 'build-mode: autobuild'"
3+
operatingSystems: ["ubuntu"]
4+
versions: ["nightly-latest"]
5+
steps:
6+
- name: Set up Java test repo configuration
7+
run: |
8+
mv * .github ../action/tests/multi-language-repo/
9+
mv ../action/tests/multi-language-repo/.github/workflows .github
10+
mv ../action/tests/java-repo/* .
11+
12+
- uses: ./../action/init
13+
id: init
14+
with:
15+
build-mode: autobuild
16+
db-location: "${{ runner.temp }}/customDbLocation"
17+
languages: java
18+
tools: ${{ steps.prepare-test.outputs.tools-url }}
19+
20+
- name: Validate database build mode
21+
run: |
22+
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
23+
build_mode=$(yq eval '.buildMode' "$metadata_path")
24+
if [[ "$build_mode" != "autobuild" ]]; then
25+
echo "Expected build mode to be 'autobuild' but was $build_mode"
26+
exit 1
27+
fi
28+
29+
- uses: ./../action/analyze
Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
name: "Build mode manual"
2+
description: "An end-to-end integration test of a Java repository built using 'build-mode: manual'"
3+
operatingSystems: ["ubuntu"]
4+
versions: ["nightly-latest"]
5+
steps:
6+
- uses: ./../action/init
7+
id: init
8+
with:
9+
build-mode: manual
10+
db-location: "${{ runner.temp }}/customDbLocation"
11+
languages: java
12+
tools: ${{ steps.prepare-test.outputs.tools-url }}
13+
14+
- name: Validate database build mode
15+
run: |
16+
metadata_path="$RUNNER_TEMP/customDbLocation/java/codeql-database.yml"
17+
build_mode=$(yq eval '.buildMode' "$metadata_path")
18+
if [[ "$build_mode" != "manual" ]]; then
19+
echo "Expected build mode to be 'manual' but was $build_mode"
20+
exit 1
21+
fi
22+
23+
- uses: ./../action/.github/actions/setup-swift
24+
with:
25+
codeql-path: ${{ steps.init.outputs.codeql-path }}
26+
27+
- name: Build code
28+
shell: bash
29+
run: ./build.sh
30+
31+
- uses: ./../action/analyze
Binary file not shown.
Binary file not shown.

tests/java-repo/.gradle/8.1.1/dependencies-accessors/gc.properties

Whitespace-only changes.
Binary file not shown.
Binary file not shown.
Binary file not shown.

0 commit comments

Comments
 (0)