mirror of
https://gitea.com/actions/checkout.git
synced 2024-11-25 10:05:56 +01:00
Added environment based path test
* __test__/verify-environment-path.sh: Added. * .github/workflows/test.yml:
This commit is contained in:
parent
e67ad3383b
commit
4f92610a97
2 changed files with 18 additions and 0 deletions
12
.github/workflows/test.yml
vendored
12
.github/workflows/test.yml
vendored
|
@ -10,6 +10,8 @@ on:
|
|||
jobs:
|
||||
build:
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
main_path: main_path_test
|
||||
steps:
|
||||
- uses: actions/setup-node@v1
|
||||
with:
|
||||
|
@ -57,6 +59,16 @@ jobs:
|
|||
shell: bash
|
||||
run: __test__/verify-clean.sh
|
||||
|
||||
# Use environment variable as path
|
||||
- name: Environment path test
|
||||
uses: ./
|
||||
with:
|
||||
ref: test-data/v2/basic
|
||||
path: ${{ env.main_path }}
|
||||
- name: Verify environment path test
|
||||
shell: bash
|
||||
run: __test__/verify-environment-path.sh
|
||||
|
||||
# Side by side
|
||||
- name: Checkout side by side 1
|
||||
uses: ./
|
||||
|
|
6
__test__/verify-environment-path.sh
Executable file
6
__test__/verify-environment-path.sh
Executable file
|
@ -0,0 +1,6 @@
|
|||
#!/bin/bash
|
||||
|
||||
if [ ! -f "./main_path_test/basic-file.txt" ]; then
|
||||
echo "Expected file does not exist"
|
||||
exit 1
|
||||
fi
|
Loading…
Reference in a new issue