|
1 | 1 | name: "Use a custom `checkout_path`"
|
2 | 2 | description: "Checks that a custom `checkout_path` will find the proper commit_oid"
|
3 | 3 | steps:
|
| 4 | + # This ensures we don't accidentally use the original checkout for any part of the test. |
| 5 | + - name: Delete original checkout |
| 6 | + shell: bash |
| 7 | + run: | |
| 8 | + # delete the original checkout so we don't accidentally use it. |
| 9 | + # Actions does not support deleting the current working directory, so we |
| 10 | + # delete the contents of the directory instead. |
| 11 | + rm -rf ./* .github .git |
4 | 12 | # Check out the actions repo again, but at a different location.
|
5 | 13 | # choose an arbitrary SHA so that we can later test that the commit_oid is not from main
|
6 | 14 | - uses: actions/checkout@v4
|
7 | 15 | with:
|
8 | 16 | ref: 474bbf07f9247ffe1856c6a0f94aeeb10e7afee6
|
9 | 17 | path: x/y/z/some-path
|
| 18 | + |
10 | 19 | - uses: ./../action/init
|
11 | 20 | with:
|
12 | 21 | tools: ${{ steps.prepare-test.outputs.tools-url }}
|
13 | 22 | # it's enough to test one compiled language and one interpreted language
|
14 | 23 | languages: csharp,javascript
|
15 |
| - source-path: x/y/z/some-path/tests/multi-language-repo |
| 24 | + source-root: x/y/z/some-path/tests/multi-language-repo |
16 | 25 | debug: true
|
| 26 | + |
17 | 27 | - name: Build code (non-windows)
|
18 | 28 | shell: bash
|
19 | 29 | if: ${{ runner.os != 'Windows' }}
|
| 30 | + working-directory: x/y/z/some-path/tests/multi-language-repo |
20 | 31 | run: |
|
21 |
| - $CODEQL_RUNNER x/y/z/some-path/tests/multi-language-repo/build.sh |
| 32 | + $CODEQL_RUNNER ./build.sh |
| 33 | +
|
22 | 34 | - name: Build code (windows)
|
23 | 35 | shell: bash
|
24 | 36 | if: ${{ runner.os == 'Windows' }}
|
| 37 | + working-directory: x/y/z/some-path/tests/multi-language-repo |
25 | 38 | run: |
|
26 |
| - x/y/z/some-path/tests/multi-language-repo/build.sh |
| 39 | + ./build.sh |
| 40 | +
|
27 | 41 | - uses: ./../action/analyze
|
28 | 42 | with:
|
29 | 43 | checkout_path: x/y/z/some-path/tests/multi-language-repo
|
|
0 commit comments