Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

The path can be relative or absolute under $GITHUB_WORKSPACE #340

Open
wants to merge 8 commits into
base: main
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Added environment based path test
    * __test__/verify-environment-path.sh:
      Added.

    * .github/workflows/test.yml:
  • Loading branch information
jwillemsen committed Aug 26, 2020
commit 4f92610a9793e6a300af7cce7417ebbace7f009f
12 changes: 12 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -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 changes: 6 additions & 0 deletions __test__/verify-environment-path.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,6 @@
#!/bin/bash

if [ ! -f "./main_path_test/basic-file.txt" ]; then
echo "Expected file does not exist"
exit 1
fi