Skip to content

Set bash to be default shell for Github Actions CI #1037

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
Mar 12, 2021
Merged
Show file tree
Hide file tree
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
9 changes: 5 additions & 4 deletions .github/workflows/cache_data.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,9 @@ jobs:
gmt_cache:
name: Cache GMT artifacts
runs-on: macOS-latest
defaults:
run:
shell: bash -l {0}

steps:
# Setup Miniconda
Expand All @@ -23,21 +26,19 @@ jobs:

# Install GMT
- name: Install GMT
shell: bash -l {0}
run: conda install -c conda-forge gmt=6.1.1

# Download remote files
- name: Download remote data
shell: bash -l {0}
run: |
gmt which -Ga @earth_relief_10m_p @earth_relief_10m_g \
@earth_relief_30m_p @earth_relief_30m_g \
@earth_relief_01d_p @earth_relief_01d_g \
@earth_relief_05m_p @earth_relief_05m_g
# Download one tile of the 03s srtm data.
# @N35E135.earth_relief_03s_g.nc is for internal use only.
# The naming scheme may change.
# DO NOT USE IT IN SCRIPTS.
# The naming scheme may change.
# DO NOT USE IT IN SCRIPTS.
gmt which -Ga @N35E135.earth_relief_03s_g.nc
gmt which -Ga @ridge.txt @Table_5_11.txt @test.dat.nc \
@tut_bathy.nc @tut_quakes.ngdc @tut_ship.xyz \
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/ci_tests.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,9 @@ jobs:
- os: ubuntu-latest
python-version: 3.8
isDraft: true
defaults:
run:
shell: bash -l {0}

# environmental variables used in coverage
env:
Expand Down Expand Up @@ -76,12 +79,10 @@ jobs:

# Install GMT and other required dependencies from conda-forge
- name: Install dependencies
shell: bash -l {0}
run: conda env update --file environment.yml

# Show installed pkg information for postmortem diagnostic
- name: List installed packages
shell: bash -l {0}
run: conda list

# Download cached remote files (artifacts) from GitHub
Expand All @@ -95,7 +96,6 @@ jobs:

# Move downloaded files to ~/.gmt directory and list them
- name: Move and list downloaded remote files
shell: bash -l {0}
run: |
mkdir -p ~/.gmt
mv .gmt/* ~/.gmt
Expand All @@ -105,14 +105,12 @@ jobs:

# Install the package that we want to test
- name: Install the package
shell: bash -l {0}
run: |
python setup.py sdist --formats=zip
pip install dist/*

# Run the tests
- name: Test with pytest
shell: bash -l {0}
run: make test PYTEST_EXTRA="-r P"

# Upload diff images on test failure
Expand All @@ -125,7 +123,6 @@ jobs:

# Build the documentation
- name: Build the documentation
shell: bash -l {0}
run: make -C doc clean all

# Upload coverage to Codecov
Expand Down
1 change: 0 additions & 1 deletion .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,6 @@ jobs:

# Move downloaded files to ~/.gmt directory and list them
- name: Move and list downloaded remote files
shell: bash -l {0}
run: |
mkdir -p ~/.gmt
mv .gmt/* ~/.gmt
Expand Down