0
1
Fork 0
mirror of https://github.com/actions/checkout synced 2024-06-30 16:32:38 +02:00

Added environment based path test

* __test__/verify-environment-path.sh:
      Added.

    * .github/workflows/test.yml:
This commit is contained in:
Johnny Willemsen 2020-08-26 12:18:55 +02:00
parent e67ad3383b
commit 4f92610a97
No known key found for this signature in database
GPG key ID: CCE55DD593057AD0
2 changed files with 18 additions and 0 deletions

View file

@ -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: ./

View 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