Skip to content

Commit

Permalink
Merge pull request #607 from mario-campos/source-root-input
Browse files Browse the repository at this point in the history
Add a 'source-root' input to the init Action
  • Loading branch information
aibaars authored Jul 13, 2021
2 parents 27e3080 + 9932052 commit 3b017ef
Show file tree
Hide file tree
Showing 12 changed files with 49 additions and 15 deletions.
22 changes: 22 additions & 0 deletions .github/workflows/pr-checks.yml
Original file line number Diff line number Diff line change
Expand Up @@ -894,3 +894,25 @@ jobs:
- name: Build code
run: ./build.sh
- uses: ./../action/analyze

test-javascript-source-root:
needs: [check-js, check-node-modules]
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v2
- uses: ./init
with:
languages: javascript
source-root: tests/multi-language-repo
- uses: ./analyze
with:
skip-queries: true
upload: false
- name: Assert database exists
run: |
cd "$RUNNER_TEMP/codeql_databases"
if [[ ! -d javascript ]]; then
echo "Did not find a JavaScript database"
exit 1
fi
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

## [UNRELEASED]

No user facing changes.
- The `init` step of the Action now supports a `source-root` input as a path to the root source-code directory. By default, the path is relative to $GITHUB_WORKSPACE. [#607](https://github.com/github/codeql-action/pull/607)

## 1.0.5 - 12 Jul 2021

Expand Down
3 changes: 3 additions & 0 deletions init/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,6 +38,9 @@ inputs:
description: Try to auto-install your python dependencies
required: true
default: 'true'
source-root:
description: Path of the root source code directory, relative to $GITHUB_WORKSPACE.
required: false
outputs:
codeql-path:
description: The path of the CodeQL binary used for analysis
Expand Down
4 changes: 3 additions & 1 deletion lib/init-action.js

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

2 changes: 1 addition & 1 deletion lib/init-action.js.map

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

3 changes: 1 addition & 2 deletions lib/init.js

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

2 changes: 1 addition & 1 deletion lib/init.js.map

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

Loading

0 comments on commit 3b017ef

Please sign in to comment.