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

Use the correct action input parameter #1963

Merged
merged 5 commits into from
Nov 2, 2023
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
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
21 changes: 18 additions & 3 deletions .github/workflows/__with-checkout-path.yml

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

20 changes: 17 additions & 3 deletions pr-checks/checks/with-checkout-path.yml
Original file line number Diff line number Diff line change
@@ -1,29 +1,43 @@
name: "Use a custom `checkout_path`"
description: "Checks that a custom `checkout_path` will find the proper commit_oid"
steps:
# This ensures we don't accidentally use the original checkout for any part of the test.
- name: Delete original checkout
shell: bash
run: |
# delete the original checkout so we don't accidentally use it.
# Actions does not support deleting the current working directory, so we
# delete the contents of the directory instead.
rm -rf ./* .github .git
# Check out the actions repo again, but at a different location.
# choose an arbitrary SHA so that we can later test that the commit_oid is not from main
- uses: actions/checkout@v4
with:
ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
path: x/y/z/some-path

- uses: ./../action/init
with:
tools: ${{ steps.prepare-test.outputs.tools-url }}
# it's enough to test one compiled language and one interpreted language
languages: csharp,javascript
source-path: x/y/z/some-path/tests/multi-language-repo
source-root: x/y/z/some-path/tests/multi-language-repo
debug: true

- name: Build code (non-windows)
shell: bash
if: ${{ runner.os != 'Windows' }}
working-directory: x/y/z/some-path/tests/multi-language-repo
run: |
$CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/build.sh
$CODEQL_RUNNER ./build.sh
henrymercer marked this conversation as resolved.
Show resolved Hide resolved

- name: Build code (windows)
shell: bash
if: ${{ runner.os == 'Windows' }}
working-directory: x/y/z/some-path/tests/multi-language-repo
run: |
x/y/z/some-path/tests/multi-language-repo/build.sh
./build.sh

- uses: ./../action/analyze
with:
checkout_path: x/y/z/some-path/tests/multi-language-repo
Expand Down