0
0
Fork 0
mirror of https://github.com/actions/checkout.git synced 2024-12-23 08:05:49 +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: jobs:
build: build:
runs-on: ubuntu-latest runs-on: ubuntu-latest
env:
main_path: main_path_test
steps: steps:
- uses: actions/setup-node@v1 - uses: actions/setup-node@v1
with: with:
@ -57,6 +59,16 @@ jobs:
shell: bash shell: bash
run: __test__/verify-clean.sh 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 # Side by side
- name: Checkout side by side 1 - name: Checkout side by side 1
uses: ./ 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