-
Notifications
You must be signed in to change notification settings - Fork 329
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
2 changed files
with
104 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,28 @@ | ||
name: "Autobuild working directory" | ||
description: "Tests working-directory input of autobuild action" | ||
os: ["ubuntu-latest"] | ||
steps: | ||
- name: Test setup | ||
shell: bash | ||
run: | | ||
mkdir autobuild-dir | ||
mv *.go autobuild-dir | ||
# The invalid go.mod breaks Go autobuild in default directory | ||
touch go.mod | ||
- uses: ./../action/init | ||
with: | ||
languages: go | ||
tools: ${{ steps.prepare-test.outputs.tools-url }} | ||
- uses: ./../action/autobuild | ||
- uses: ./../action/analyze | ||
id: analysis | ||
env: | ||
TEST_MODE: true | ||
- name: Check database | ||
shell: bash | ||
run: | | ||
GO_DB="${{ fromJson(steps.analysis.outputs.db-locations).go }}" | ||
if [[ ! -d "$GO_DB" ]]; then | ||
echo "Did not create a database." | ||
exit 1 | ||
fi |