mirror of
https://github.com/actions/checkout.git
synced 2024-11-24 23:51:41 +08: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
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 New Issue
Block a user