Skip to content

CI: Add GMT's bin to PATH for GMT dev tests #877

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

Merged
merged 1 commit into from
Feb 12, 2021
Merged
Changes from all commits
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
4 changes: 4 additions & 0 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,10 @@ jobs:
python setup.py sdist --formats=zip
pip install dist/*

- name: Add GMT's bin to PATH (Linux/macOS)
run: echo ${GITHUB_WORKSPACE}/gmt-install-dir/bin >> $GITHUB_PATH
if: runner.os != 'Windows'

# Run the tests
- name: Test with pytest (Linux/macOS)
run: make test PYTEST_EXTRA="-r P"
Comment on lines +121 to 127
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can we just add it inline here?

Suggested change
- name: Add GMT's bin to PATH (Linux/macOS)
run: echo ${GITHUB_WORKSPACE}/gmt-install-dir/bin >> $GITHUB_PATH
if: runner.os != 'Windows'
# Run the tests
- name: Test with pytest (Linux/macOS)
run: make test PYTEST_EXTRA="-r P"
# Run the tests
- name: Test with pytest (Linux/macOS)
run: |
echo ${GITHUB_WORKSPACE}/gmt-install-dir/bin >> $GITHUB_PATH # Add GMT's bin to PATH
make test PYTEST_EXTRA="-r P"

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think it will work.

Prepends a directory to the system PATH variable and makes it available to all subsequent actions in the current job; the currently running action cannot access the updated path variable.

https://docs.github.com/en/actions/reference/workflow-commands-for-github-actions#adding-a-system-path

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah, that's annoying, nevermind then.

Expand Down