Fix running script from other directory #10
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Test PR | |
on: | |
pull_request: | |
jobs: | |
test: | |
strategy: | |
matrix: | |
runs-on: | |
- ubuntu-latest | |
- macos-latest | |
name: Test (${{matrix.runs-on}}) | |
runs-on: ${{matrix.runs-on}} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
- name: Run unit tests | |
run: | | |
./backport.functions_tests | |
- name: Test supports execution from non-current directory | |
run: | | |
# Test supports execution from non-current directory | |
SCRIPT_DIR="$(pwd)" | |
EMPTY_DIR=/var/empty | |
mkdir --parents ${EMPTY_DIR} | |
cd ${EMPTY_DIR} | |
${SCRIPT_DIR}/backport | |