Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add a 'source-root' input to the init Action #607

Merged
merged 21 commits into from
Jul 13, 2021
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
21 commits
Select commit Hold shift + click to select a range
42babdf
Add 'source-root' input to init action
mario-campos Jun 29, 2021
337ae83
Make 'source-root' init input relative to github.workspace
mario-campos Jun 29, 2021
a05a7f9
Remove '${{ github.workspace }}' from action.yml
mario-campos Jun 29, 2021
57f584a
Update CHANGELOG for PR #607
mario-campos Jun 29, 2021
e1cd524
Recompile JS files to bring JS inline with TS for PR #607
mario-campos Jun 29, 2021
66df091
Refer to $GITHUB_WORKSPACE specifically in source-root description
mario-campos Jun 30, 2021
35e1b55
Use path.resolve instead of path.join for sourceRoot
mario-campos Jun 30, 2021
a607042
Recompile code after accepting suggestions from PR #607 review
mario-campos Jun 30, 2021
c6728b6
Merge branch 'main' into source-root-input
adityasharad Jul 1, 2021
45c0f11
Clarify 'source-root' description to include default path
mario-campos Jul 1, 2021
c78fb87
Add test case for 'source-root' input to 'init' Action
mario-campos Jul 1, 2021
028f98f
Use different config file for testing 'source-root' input
mario-campos Jul 1, 2021
67d6f79
Delete 'packaing' from source-root test job name
mario-campos Jul 1, 2021
1c69fae
Avoid moving repo files out of \$GITHUB_WORKSPACE in 'source-root' test
mario-campos Jul 1, 2021
2ca807c
Merge branch 'source-root-input' of github.com:mario-campos/codeql-ac…
mario-campos Jul 1, 2021
12f1cff
Rename CodeQL action paths in 'source-root' test to reflect repo paths
mario-campos Jul 1, 2021
2c0da4b
Remove build.sh step from 'source-root' test
mario-campos Jul 1, 2021
b9217ca
Test presence of database instead of results of analysis
mario-campos Jul 2, 2021
06c6845
Add analyze step to 'source-root' input test case
mario-campos Jul 2, 2021
a4a91a8
Merge branch 'main' into source-root-input
mario-campos Jul 2, 2021
9932052
Merge branch 'main' into source-root-input
aibaars Jul 13, 2021
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
mario-campos marked this conversation as resolved.
Show resolved Hide resolved
- 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