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 384abcf
Show file tree
Hide file tree
Showing 2 changed files with 104 additions and 0 deletions.
76 changes: 76 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.

28 changes: 28 additions & 0 deletions pr-checks/checks/test-autobuild-working-dir.yml
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

0 comments on commit 384abcf

Please sign in to comment.