-
Notifications
You must be signed in to change notification settings - Fork 245
Add a workflow and Makefile target to test old GMT versions every Tuesday #2079
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
Changes from 1 commit
8d3cf45
f303f81
8e729eb
21024e2
efd3b3f
a239ac8
aa5f410
c8fb052
fd7e209
be81f36
5292538
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change | ||||
|---|---|---|---|---|---|---|
| @@ -0,0 +1,105 @@ | ||||||
| # This workflow installs PyGMT and runs tests | ||||||
|
seisman marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| name: GMT Backward Tests | ||||||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not so sure if 'backward' is a good word, how about 'legacy' (https://en.wikipedia.org/wiki/Legacy_system)? Maybe we need to ask a native English speaker 🙂
Suggested change
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Legacy sounds good and let's wait for some inputs for native English speakers.
Member
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Done in be81f36 |
||||||
|
|
||||||
| on: | ||||||
| # push: | ||||||
| # branches: [ main ] | ||||||
| pull_request: | ||||||
| # types: [ready_for_review] | ||||||
|
seisman marked this conversation as resolved.
|
||||||
| paths-ignore: | ||||||
| - 'doc/**' | ||||||
| - 'examples/**' | ||||||
| - '*.md' | ||||||
| - 'README.rst' | ||||||
| - 'LICENSE.txt' | ||||||
| - '.gitignore' | ||||||
| # Schedule tests on Monday/Wednesday/Friday | ||||||
|
seisman marked this conversation as resolved.
Outdated
|
||||||
| schedule: | ||||||
| - cron: '0 0 * * 1,3,5' | ||||||
|
weiji14 marked this conversation as resolved.
Outdated
seisman marked this conversation as resolved.
Outdated
|
||||||
|
|
||||||
| jobs: | ||||||
| test: | ||||||
| name: ${{ matrix.os }} - GMT ${{ matrix.gmt_version }} | ||||||
| runs-on: ${{ matrix.os }} | ||||||
| strategy: | ||||||
| fail-fast: false | ||||||
| matrix: | ||||||
| python-version: ['3.10'] | ||||||
|
seisman marked this conversation as resolved.
Outdated
|
||||||
| os: [ubuntu-latest, macOS-latest, windows-latest] | ||||||
|
seisman marked this conversation as resolved.
Outdated
|
||||||
| gmt_version: ['6.3'] | ||||||
| timeout-minutes: 30 | ||||||
| defaults: | ||||||
| run: | ||||||
| shell: bash -l {0} | ||||||
|
|
||||||
| steps: | ||||||
| # Cancel previous runs that are not completed | ||||||
| - name: Cancel Previous Runs | ||||||
| uses: styfle/cancel-workflow-action@0.10.0 | ||||||
| with: | ||||||
| access_token: ${{ github.token }} | ||||||
|
|
||||||
| # Checkout current git repository | ||||||
| - name: Checkout | ||||||
| uses: actions/checkout@v3.0.2 | ||||||
| with: | ||||||
| # fetch all history so that setuptools-scm works | ||||||
| fetch-depth: 0 | ||||||
|
|
||||||
| # Install Mambaforge with conda-forge dependencies | ||||||
| - name: Setup Mambaforge | ||||||
| uses: conda-incubator/setup-miniconda@v2.1.1 | ||||||
| with: | ||||||
| activate-environment: pygmt | ||||||
| python-version: ${{ matrix.python-version }} | ||||||
| channels: conda-forge,nodefaults | ||||||
| channel-priority: strict | ||||||
| miniforge-version: latest | ||||||
| miniforge-variant: Mambaforge | ||||||
| mamba-version: "*" | ||||||
| use-mamba: true | ||||||
|
|
||||||
| # Install GMT and other required dependencies from conda-forge | ||||||
| - name: Install dependencies | ||||||
| run: | | ||||||
| mamba install gmt=${{ matrix.gmt_version }} numpy \ | ||||||
| pandas xarray netCDF4 packaging geopandas \ | ||||||
| build dvc make pytest>=6.0 \ | ||||||
|
seisman marked this conversation as resolved.
|
||||||
| pytest-cov pytest-doctestplus pytest-mpl sphinx-gallery | ||||||
|
seisman marked this conversation as resolved.
|
||||||
|
|
||||||
| # Show installed pkg information for postmortem diagnostic | ||||||
| - name: List installed packages | ||||||
| run: mamba list | ||||||
|
|
||||||
| # Download cached remote files (artifacts) from GitHub | ||||||
| - name: Download remote data from GitHub | ||||||
| uses: dawidd6/action-download-artifact@v2.22.0 | ||||||
| with: | ||||||
| workflow: cache_data.yaml | ||||||
| workflow_conclusion: success | ||||||
| name: gmt-cache | ||||||
| path: .gmt | ||||||
|
|
||||||
| # Move downloaded files to ~/.gmt directory and list them | ||||||
| - name: Move and list downloaded remote files | ||||||
| run: | | ||||||
| mkdir -p ~/.gmt | ||||||
| mv .gmt/* ~/.gmt | ||||||
| # Change modification times of the two files, so GMT won't refresh it | ||||||
| touch ~/.gmt/server/gmt_data_server.txt ~/.gmt/server/gmt_hash_server.txt | ||||||
| ls -lhR ~/.gmt | ||||||
|
|
||||||
| # Pull baseline image data from dvc remote (DAGsHub) | ||||||
| - name: Pull baseline image data from dvc remote | ||||||
| run: | | ||||||
| dvc pull --verbose | ||||||
|
seisman marked this conversation as resolved.
Outdated
|
||||||
| ls -lhR pygmt/tests/baseline/ | ||||||
|
seisman marked this conversation as resolved.
maxrjones marked this conversation as resolved.
|
||||||
|
|
||||||
| # Install the package that we want to test | ||||||
| - name: Install the package | ||||||
| run: make install | ||||||
|
|
||||||
| # Run the tests but skip images | ||||||
| - name: Run tests | ||||||
| run: make test_no_images PYTEST_EXTRA="-r P" | ||||||
Uh oh!
There was an error while loading. Please reload this page.