-
Notifications
You must be signed in to change notification settings - Fork 309
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Add autobuild workind-directory test
- Loading branch information
Showing
4 changed files
with
119 additions
and
0 deletions.
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: "Autobuild working directory" | ||
description: "Tests working-directory input of autobuild action" | ||
versions: ["latest"] | ||
os: ["ubuntu-latest"] | ||
steps: | ||
- name: Test setup | ||
shell: bash | ||
run: | | ||
# Make sure that Gradle build succeeds in autobuild-dir ... | ||
cp -a ../action/tests/java-repo autobuild-dir | ||
# ... and fails if attempted in the current directory | ||
echo > build.gradle | ||
- uses: ./../action/init | ||
with: | ||
languages: java | ||
tools: ${{ steps.prepare-test.outputs.tools-url }} | ||
- uses: ./../action/autobuild | ||
with: | ||
working-directory: autobuild-dir | ||
- uses: ./../action/analyze | ||
env: | ||
TEST_MODE: true | ||
- name: Check database | ||
shell: bash | ||
run: | | ||
cd "$RUNNER_TEMP/codeql_databases" | ||
if [[ ! -d java ]]; then | ||
ls -l | ||
echo "Did not find a Java database" | ||
exit 1 | ||
fi |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
plugins { | ||
id 'application' | ||
} | ||
|
||
repositories { | ||
mavenCentral() | ||
} | ||
|
||
application { | ||
mainClass = 'Main' | ||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,8 @@ | ||
class Main { | ||
public static void main(String args[]) { | ||
if (true) { | ||
System.out.println("Hello, World!"); | ||
} | ||
} | ||
} | ||
|