From 2872225d39c827dd5b2e0384698375f11dcfbead Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Mar 2021 23:39:14 -0500 Subject: [PATCH 01/14] Make a copy from ci_test.yaml --- .github/workflows/docs.yml | 198 +++++++++++++++++++++++++++++++++++++ 1 file changed, 198 insertions(+) create mode 100644 .github/workflows/docs.yml diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml new file mode 100644 index 00000000000..df714fd1fbb --- /dev/null +++ b/.github/workflows/docs.yml @@ -0,0 +1,198 @@ +# This workflow installs PyGMT dependencies, build documentation and run tests +# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions + +name: Tests + +on: + push: + branches: [ master ] + pull_request: + types: [opened, reopened, synchronize, ready_for_review] + paths-ignore: + - 'doc/**' + - '*.md' + - '*.json' + - 'README.rst' + - 'LICENSE.txt' + release: + types: + - published + # Schedule daily tests + schedule: + - cron: '0 0 * * *' + +jobs: + test: + name: ${{ matrix.os }} - Python ${{ matrix.python-version }} + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + python-version: [3.7, 3.8, 3.9] + os: [ubuntu-latest, macOS-latest, windows-latest] + # Is it a draft Pull Request (true or false)? + isDraft: + - ${{ github.event.pull_request.draft }} + # Only run one job (Ubuntu + Python 3.9) for draft PRs + exclude: + - os: macOS-latest + isDraft: true + - os: windows-latest + isDraft: true + - os: ubuntu-latest + python-version: 3.7 + isDraft: true + - os: ubuntu-latest + python-version: 3.8 + isDraft: true + + # environmental variables used in coverage + env: + OS: ${{ matrix.os }} + PYTHON: ${{ matrix.python-version }} + + steps: + # Cancel previous runs that are not completed + - name: Cancel Previous Runs + uses: styfle/cancel-workflow-action@0.8.0 + with: + access_token: ${{ github.token }} + + # Checkout current git repository + - name: Checkout + uses: actions/checkout@v2.3.4 + with: + # fecth all history so that setuptools-scm works + fetch-depth: 0 + + # Setup Miniconda + - name: Setup Miniconda + uses: conda-incubator/setup-miniconda@v2.0.1 + with: + activate-environment: pygmt + python-version: ${{ matrix.python-version }} + channels: conda-forge + miniconda-version: "latest" + + # 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 + - name: Download remote data from GitHub + uses: dawidd6/action-download-artifact@v2.12.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 + shell: bash -l {0} + 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 + + # 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 + - name: Upload diff images if any test fails + uses: actions/upload-artifact@v2 + if: ${{ failure() }} + with: + name: artifact-${{ runner.os }}-${{ matrix.python-version }} + path: tmp-test-dir-with-unique-name + + # Build the documentation + - name: Build the documentation + shell: bash -l {0} + run: make -C doc clean all + + # Upload coverage to Codecov + - name: Upload coverage to Codecov + uses: codecov/codecov-action@v1.2.1 + with: + file: ./coverage.xml # optional + env_vars: OS,PYTHON + fail_ci_if_error: false + + - name: Checkout the gh-pages branch + uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b + with: + ref: gh-pages + # Checkout to this folder instead of the current one + path: deploy + # Download the entire history + fetch-depth: 0 + if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') + + - name: Push the built HTML to gh-pages + run: | + # Detect if this is a release or from the master branch + if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then + # Get the tag name without the "refs/tags/" part + version="${GITHUB_REF#refs/*/}" + else + version=dev + fi + echo "Deploying version: $version" + # Make the new commit message. Needs to happen before cd into deploy + # to get the right commit hash. + message="Deploy $version from $(git rev-parse --short HEAD)" + cd deploy + # Need to have this file so that Github doesn't try to run Jekyll + touch .nojekyll + # Delete all the files and replace with our new set + echo -e "\nRemoving old files from previous builds of ${version}:" + rm -rvf ${version} + echo -e "\nCopying HTML files to ${version}:" + cp -Rvf ../doc/_build/html/ ${version}/ + # If this is a new release, update the link from /latest to it + if [[ "${version}" != "dev" ]]; then + echo -e "\nSetup link from ${version} to 'latest'." + rm -f latest + ln -sf ${version} latest + fi + # Stage the commit + git add -A . + echo -e "\nChanges to be applied:" + git status + # Configure git to be the GitHub Actions account + git config user.email "github-actions[bot]@users.noreply.github.com" + git config user.name "github-actions[bot]" + # If this is a dev build and the last commit was from a dev build + # (detect if "dev" was in the previous commit message), reuse the + # same commit + if [[ "${version}" == "dev" && `git log -1 --format='%s'` == *"dev"* ]]; then + echo -e "\nAmending last commit:" + git commit --amend --reset-author -m "$message" + else + echo -e "\nMaking a new commit:" + git commit -m "$message" + fi + # Make the push quiet just in case there is anything that could leak + # sensitive information. + echo -e "\nPushing changes to gh-pages." + git push -fq origin gh-pages 2>&1 >/dev/null + echo -e "\nFinished uploading generated files." + if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') From 2b1cfbde3e451111c5ec9e178766dc4dc76be50d Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Mar 2021 23:45:02 -0500 Subject: [PATCH 02/14] Delete the documentation building part from Tests workflow --- .github/workflows/ci_tests.yaml | 69 +-------------------------------- 1 file changed, 1 insertion(+), 68 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index df714fd1fbb..b6621fbf7c0 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -1,5 +1,4 @@ -# This workflow installs PyGMT dependencies, build documentation and run tests -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions +# This workflow installs PyGMT and run tests name: Tests @@ -123,11 +122,6 @@ jobs: name: artifact-${{ runner.os }}-${{ matrix.python-version }} path: tmp-test-dir-with-unique-name - # Build the documentation - - name: Build the documentation - shell: bash -l {0} - run: make -C doc clean all - # Upload coverage to Codecov - name: Upload coverage to Codecov uses: codecov/codecov-action@v1.2.1 @@ -135,64 +129,3 @@ jobs: file: ./coverage.xml # optional env_vars: OS,PYTHON fail_ci_if_error: false - - - name: Checkout the gh-pages branch - uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b - with: - ref: gh-pages - # Checkout to this folder instead of the current one - path: deploy - # Download the entire history - fetch-depth: 0 - if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') - - - name: Push the built HTML to gh-pages - run: | - # Detect if this is a release or from the master branch - if [[ "${GITHUB_EVENT_NAME}" == "release" ]]; then - # Get the tag name without the "refs/tags/" part - version="${GITHUB_REF#refs/*/}" - else - version=dev - fi - echo "Deploying version: $version" - # Make the new commit message. Needs to happen before cd into deploy - # to get the right commit hash. - message="Deploy $version from $(git rev-parse --short HEAD)" - cd deploy - # Need to have this file so that Github doesn't try to run Jekyll - touch .nojekyll - # Delete all the files and replace with our new set - echo -e "\nRemoving old files from previous builds of ${version}:" - rm -rvf ${version} - echo -e "\nCopying HTML files to ${version}:" - cp -Rvf ../doc/_build/html/ ${version}/ - # If this is a new release, update the link from /latest to it - if [[ "${version}" != "dev" ]]; then - echo -e "\nSetup link from ${version} to 'latest'." - rm -f latest - ln -sf ${version} latest - fi - # Stage the commit - git add -A . - echo -e "\nChanges to be applied:" - git status - # Configure git to be the GitHub Actions account - git config user.email "github-actions[bot]@users.noreply.github.com" - git config user.name "github-actions[bot]" - # If this is a dev build and the last commit was from a dev build - # (detect if "dev" was in the previous commit message), reuse the - # same commit - if [[ "${version}" == "dev" && `git log -1 --format='%s'` == *"dev"* ]]; then - echo -e "\nAmending last commit:" - git commit --amend --reset-author -m "$message" - else - echo -e "\nMaking a new commit:" - git commit -m "$message" - fi - # Make the push quiet just in case there is anything that could leak - # sensitive information. - echo -e "\nPushing changes to gh-pages." - git push -fq origin gh-pages 2>&1 >/dev/null - echo -e "\nFinished uploading generated files." - if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') From 4578d0ab3c7f033c026b2d1be021cc700e0f06c8 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Tue, 9 Mar 2021 23:47:04 -0500 Subject: [PATCH 03/14] Delete testing part from Docs workflow and only build docs with Python 3.9 --- .github/workflows/docs.yml | 59 ++++++++------------------------------ 1 file changed, 12 insertions(+), 47 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index df714fd1fbb..ef7d9161165 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -1,34 +1,31 @@ -# This workflow installs PyGMT dependencies, build documentation and run tests -# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions +# This workflow installs PyGMT, builds and deploys documentation -name: Tests +name: Docs on: push: branches: [ master ] pull_request: types: [opened, reopened, synchronize, ready_for_review] - paths-ignore: - - 'doc/**' - - '*.md' - - '*.json' + paths: + - '.github/workflows/**' - 'README.rst' - - 'LICENSE.txt' + - 'doc/**' + - 'examples/**' + - 'pygmt/**' + - '!pygmt/tests/**' release: types: - published - # Schedule daily tests - schedule: - - cron: '0 0 * * *' jobs: - test: + docs: name: ${{ matrix.os }} - Python ${{ matrix.python-version }} runs-on: ${{ matrix.os }} strategy: fail-fast: false matrix: - python-version: [3.7, 3.8, 3.9] + python-version: [3.9] os: [ubuntu-latest, macOS-latest, windows-latest] # Is it a draft Pull Request (true or false)? isDraft: @@ -39,17 +36,6 @@ jobs: isDraft: true - os: windows-latest isDraft: true - - os: ubuntu-latest - python-version: 3.7 - isDraft: true - - os: ubuntu-latest - python-version: 3.8 - isDraft: true - - # environmental variables used in coverage - env: - OS: ${{ matrix.os }} - PYTHON: ${{ matrix.python-version }} steps: # Cancel previous runs that are not completed @@ -110,32 +96,11 @@ jobs: 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 - - name: Upload diff images if any test fails - uses: actions/upload-artifact@v2 - if: ${{ failure() }} - with: - name: artifact-${{ runner.os }}-${{ matrix.python-version }} - path: tmp-test-dir-with-unique-name - # Build the documentation - name: Build the documentation shell: bash -l {0} run: make -C doc clean all - # Upload coverage to Codecov - - name: Upload coverage to Codecov - uses: codecov/codecov-action@v1.2.1 - with: - file: ./coverage.xml # optional - env_vars: OS,PYTHON - fail_ci_if_error: false - - name: Checkout the gh-pages branch uses: actions/checkout@28c7f3d2b5162b5ddd3dfd9a45aa55eaf396478b with: @@ -144,7 +109,7 @@ jobs: path: deploy # Download the entire history fetch-depth: 0 - if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') + if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') - name: Push the built HTML to gh-pages run: | @@ -195,4 +160,4 @@ jobs: echo -e "\nPushing changes to gh-pages." git push -fq origin gh-pages 2>&1 >/dev/null echo -e "\nFinished uploading generated files." - if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') && (matrix.python-version == '3.9') + if: (github.event_name == 'release' || github.event_name == 'push') && (matrix.os == 'ubuntu-latest') From 2dbcf85b1178e72660c94c88cb73ee1931204d44 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 10 Mar 2021 12:19:50 -0500 Subject: [PATCH 04/14] Only install required pacakges --- .github/workflows/docs.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index ef7d9161165..e520b931eb4 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -63,7 +63,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 + run: | + conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ + make \ + sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.4.3 # Show installed pkg information for postmortem diagnostic - name: List installed packages From 98d41100fc86f05d38672673e9cc99529235aeb8 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 10 Mar 2021 16:01:56 -0500 Subject: [PATCH 05/14] Install myst_parser --- .github/workflows/docs.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e520b931eb4..2c93aefdf83 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -66,7 +66,8 @@ jobs: run: | conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ make \ - sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.4.3 + sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.4.3 \ + myst-parser # Show installed pkg information for postmortem diagnostic - name: List installed packages From bdb345ceefb2302c599f4cb207b955f397f3316c Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 10 Mar 2021 16:14:57 -0500 Subject: [PATCH 06/14] Add ipython --- .github/workflows/docs.yml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index 2c93aefdf83..a7b3d4643e0 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -65,9 +65,8 @@ jobs: shell: bash -l {0} run: | conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ - make \ - sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.4.3 \ - myst-parser + make sphinx sphinx-copybutton sphinx-gallery \ + sphinx_rtd_theme=0.4.3 myst-parser ipython # Show installed pkg information for postmortem diagnostic - name: List installed packages From 10a9a1090a8ab9b56d13701468c5bd6c8a63e9ee Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Wed, 10 Mar 2021 16:30:16 -0500 Subject: [PATCH 07/14] Install required packages for testing --- .github/workflows/ci_tests.yaml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index b6621fbf7c0..08f160d1f88 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -76,7 +76,11 @@ jobs: # Install GMT and other required dependencies from conda-forge - name: Install dependencies shell: bash -l {0} - run: conda env update --file environment.yml + run: | + conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ + codecov coverage[toml] \ + pytest-cov pytest-mpl pytest>=6.0 \ + ipython # Show installed pkg information for postmortem diagnostic - name: List installed packages From f06df1bb6d9cedaffec1e099a8c10715f184fa7e Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 13 Mar 2021 17:04:55 -0500 Subject: [PATCH 08/14] Set default shell --- .github/workflows/docs.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index a7b3d4643e0..e787117eb71 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -36,6 +36,9 @@ jobs: isDraft: true - os: windows-latest isDraft: true + defaults: + run: + shell: bash -l {0} steps: # Cancel previous runs that are not completed @@ -62,7 +65,6 @@ jobs: # Install GMT and other required dependencies from conda-forge - name: Install dependencies - shell: bash -l {0} run: | conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ make sphinx sphinx-copybutton sphinx-gallery \ @@ -70,7 +72,6 @@ jobs: # 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 @@ -84,7 +85,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 @@ -94,14 +94,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/* # Build the documentation - name: Build the documentation - shell: bash -l {0} run: make -C doc clean all - name: Checkout the gh-pages branch From 9c2bbabc38d7f6fc7448affe67ea9457d60ad622 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 13 Mar 2021 17:06:10 -0500 Subject: [PATCH 09/14] Fix a typo --- .github/workflows/ci_tests.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index d9c54f3bca4..0eeef297aa1 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -1,4 +1,4 @@ -# This workflow installs PyGMT and run tests +# This workflow installs PyGMT and runs tests name: Tests @@ -80,7 +80,7 @@ jobs: - name: Install dependencies run: | conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ - codecov coverage[toml] \ + make codecov coverage[toml] \ pytest-cov pytest-mpl pytest>=6.0 \ ipython From 7c1b769eaecf05941f8d703e1780f2b9638ec339 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sat, 13 Mar 2021 17:34:09 -0500 Subject: [PATCH 10/14] Improve the trigger condition --- .github/workflows/ci_tests.yaml | 3 +++ .github/workflows/docs.yml | 14 +++++++------- 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 0eeef297aa1..66389182af7 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -9,10 +9,13 @@ on: types: [opened, reopened, synchronize, ready_for_review] paths-ignore: - 'doc/**' + - 'examples/**' - '*.md' - '*.json' - 'README.rst' - 'LICENSE.txt' + - '.gitignore' + - '.pylintrc' release: types: - published diff --git a/.github/workflows/docs.yml b/.github/workflows/docs.yml index e787117eb71..6fe74dd6232 100644 --- a/.github/workflows/docs.yml +++ b/.github/workflows/docs.yml @@ -7,13 +7,13 @@ on: branches: [ master ] pull_request: types: [opened, reopened, synchronize, ready_for_review] - paths: - - '.github/workflows/**' - - 'README.rst' - - 'doc/**' - - 'examples/**' - - 'pygmt/**' - - '!pygmt/tests/**' + paths-ignore: + - 'pygmt/tests/**' + - '*.md' + - '*.json' + - 'LICENSE.txt' + - '.gitignore' + - '.pylintrc' release: types: - published From 6072215fadfdf915f4c67e99cb4f33cf52af2f51 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 14 Mar 2021 21:29:11 -0400 Subject: [PATCH 11/14] Rename docs.yml to ci_docs.yml --- .github/workflows/{docs.yml => ci_docs.yml} | 0 1 file changed, 0 insertions(+), 0 deletions(-) rename .github/workflows/{docs.yml => ci_docs.yml} (100%) diff --git a/.github/workflows/docs.yml b/.github/workflows/ci_docs.yml similarity index 100% rename from .github/workflows/docs.yml rename to .github/workflows/ci_docs.yml From 0c4b3118f48be044a9c2613eb32a2d76c16c37e5 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 14 Mar 2021 23:06:12 -0400 Subject: [PATCH 12/14] Sort packages alphabetically --- .github/workflows/ci_docs.yml | 4 ++-- .github/workflows/ci_tests.yaml | 5 ++--- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/.github/workflows/ci_docs.yml b/.github/workflows/ci_docs.yml index 6fe74dd6232..72a32f117d2 100644 --- a/.github/workflows/ci_docs.yml +++ b/.github/workflows/ci_docs.yml @@ -67,8 +67,8 @@ jobs: - name: Install dependencies run: | conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ - make sphinx sphinx-copybutton sphinx-gallery \ - sphinx_rtd_theme=0.4.3 myst-parser ipython + ipython make myst-parser \ + sphinx sphinx-copybutton sphinx-gallery sphinx_rtd_theme=0.4.3 # Show installed pkg information for postmortem diagnostic - name: List installed packages diff --git a/.github/workflows/ci_tests.yaml b/.github/workflows/ci_tests.yaml index 66389182af7..73e4624ff4e 100644 --- a/.github/workflows/ci_tests.yaml +++ b/.github/workflows/ci_tests.yaml @@ -83,9 +83,8 @@ jobs: - name: Install dependencies run: | conda install gmt=6.1.1 numpy pandas xarray netCDF4 packaging \ - make codecov coverage[toml] \ - pytest-cov pytest-mpl pytest>=6.0 \ - ipython + codecov coverage[toml] ipython make \ + pytest-cov pytest-mpl pytest>=6.0 # Show installed pkg information for postmortem diagnostic - name: List installed packages From 45487cb7afd9f4ef2e7e5c8cf056e050af206c00 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Sun, 14 Mar 2021 23:13:56 -0400 Subject: [PATCH 13/14] Add information of ci_docs.yml workflow to MAINTENANCE.md --- MAINTENANCE.md | 20 +++++++++++++------- 1 file changed, 13 insertions(+), 7 deletions(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index d4477f90b4b..adfe2b8644a 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -65,7 +65,7 @@ build and test the project on Linux, macOS and Windows. They rely on the `environment.yml` file to install required dependencies using conda and the `Makefile` to run the tests and checks. -There are 8 configuration files located in `.github/workflows`: +There are 9 configuration files located in `.github/workflows`: 1. `style_checks.yaml` (Code lint and style checks) @@ -79,6 +79,12 @@ There are 8 configuration files located in `.github/workflows`: In draft Pull Requests, only one job (Ubuntu + Python latest) is triggered to save on Continuous Integration resources. +3. `ci_docs.yml` (Build documentation on Linux/macOS/Windows) + + This is run on every commit to the *master* and Pull Request branches. + In draft Pull Request, only the job on Ubuntu is triggerd to save on + Continuous Integration resources. + On the *master* branch, the workflow also handles the documentation deployment: @@ -86,35 +92,35 @@ There are 8 configuration files located in `.github/workflows`: from the *master* branch onto the `dev` folder of the *gh-pages* branch. * Updating the `latest` documentation link to the new release. -3. `ci_tests_dev.yaml` (GMT Dev Tests on Linux/macOS/Windows). +4. `ci_tests_dev.yaml` (GMT Dev Tests on Linux/macOS/Windows). This is triggered when a PR is marked as "ready for review", or using the slash command `/test-gmt-dev`. It is also scheduled to run daily on the *master* branch. -4. `cache_data.yaml` (Caches GMT remote data files needed for GitHub Actions CI) +5. `cache_data.yaml` (Caches GMT remote data files needed for GitHub Actions CI) This is scheduled to run every Sunday at 12:00 (UTC). If new remote files are needed urgently, maintainers can manually uncomment the 'pull_request:' line in that `cache_data.yaml` file to refresh the cache. -5. `publish-to-pypi.yml` (Publish wheels to PyPI and TestPyPI) +6. `publish-to-pypi.yml` (Publish wheels to PyPI and TestPyPI) This workflow is run to publish wheels to PyPI and TestPyPI (for testing only). Archives will be pushed to TestPyPI on every commit to the *master* branch and tagged releases, and to PyPI for tagged releases only. -6. `release-drafter.yml` (Drafts the next release notes) +7. `release-drafter.yml` (Drafts the next release notes) This workflow is run to update the next releases notes as pull requests are merged into master. -7. `check-links.yml` (Check links in the repository and website) +8. `check-links.yml` (Check links in the repository and website) This workflow is run weekly to check all external links in plaintext and HTML files. It will create an issue if broken links are found. -8. `format-command.yml` (Format the codes using slash command) +9. `format-command.yml` (Format the codes using slash command) This workflow is triggered in a PR if the slash command `/format` is used. From e8ac10391db4382910489356874f3ce27ae05d91 Mon Sep 17 00:00:00 2001 From: Dongdong Tian Date: Mon, 15 Mar 2021 00:06:34 -0400 Subject: [PATCH 14/14] Apply suggestions from code review Co-authored-by: Wei Ji <23487320+weiji14@users.noreply.github.com> --- MAINTENANCE.md | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/MAINTENANCE.md b/MAINTENANCE.md index adfe2b8644a..69ba4ec77dc 100644 --- a/MAINTENANCE.md +++ b/MAINTENANCE.md @@ -76,13 +76,13 @@ There are 9 configuration files located in `.github/workflows`: This is run on every commit to the *master* and Pull Request branches. It is also scheduled to run daily on the *master* branch. - In draft Pull Requests, only one job (Ubuntu + Python latest) + In draft Pull Requests, only one job (Linux + Python latest) is triggered to save on Continuous Integration resources. 3. `ci_docs.yml` (Build documentation on Linux/macOS/Windows) This is run on every commit to the *master* and Pull Request branches. - In draft Pull Request, only the job on Ubuntu is triggerd to save on + In draft Pull Requests, only the job on Linux is triggered to save on Continuous Integration resources. On the *master* branch, the workflow also handles the documentation