From 4f92610a9793e6a300af7cce7417ebbace7f009f Mon Sep 17 00:00:00 2001 From: Johnny Willemsen Date: Wed, 26 Aug 2020 12:18:55 +0200 Subject: [PATCH] Added environment based path test * __test__/verify-environment-path.sh: Added. * .github/workflows/test.yml: --- .github/workflows/test.yml | 12 ++++++++++++ __test__/verify-environment-path.sh | 6 ++++++ 2 files changed, 18 insertions(+) create mode 100755 __test__/verify-environment-path.sh diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index 87360d3..813b9cd 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -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: ./ diff --git a/__test__/verify-environment-path.sh b/__test__/verify-environment-path.sh new file mode 100755 index 0000000..bd64859 --- /dev/null +++ b/__test__/verify-environment-path.sh @@ -0,0 +1,6 @@ +#!/bin/bash + +if [ ! -f "./main_path_test/basic-file.txt" ]; then + echo "Expected file does not exist" + exit 1 +fi