Skip to content

Commit

Permalink
Add autobuild workind-directory test
Browse files Browse the repository at this point in the history
  • Loading branch information
cklin committed Apr 8, 2022
1 parent b0c570e commit e9c9bf8
Show file tree
Hide file tree
Showing 2 changed files with 106 additions and 0 deletions.
77 changes: 77 additions & 0 deletions .github/workflows/__test-autobuild-working-dir.yml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

29 changes: 29 additions & 0 deletions pr-checks/checks/test-autobuild-working-dir.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: "Autobuild working directory"
description: "Tests working-directory input of autobuild action"
os: ["ubuntu-latest"]
steps:
- name: Test setup
shell: bash
description: Make sure that Go autobuild succeeds only in autobuild-dir
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

0 comments on commit e9c9bf8

Please sign in to comment.