Skip to content

Add slash command '/test-gmt-dev' to test GMT dev version #831

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 7 commits into from
Feb 2, 2021
Merged
Show file tree
Hide file tree
Changes from 5 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
8 changes: 6 additions & 2 deletions .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,10 @@ Fixes #
- [ ] Write detailed docstrings for all functions/methods.
- [ ] If adding new functionality, add an example to docstrings or tutorials.

**Notes**
**Slash Commands**

- You can write `/format` in the first line of a comment to lint the code automatically
You can write slash commands (`/command`) in the first line of a comment to perform
specific operations. Supported slash commands are:

- `/format`: format and lint the codes automatically
- `/test-gmt-master`: run the full tests with the GMT latest codes
34 changes: 33 additions & 1 deletion .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,9 @@ on:
# push:
# branches: [ master ]
pull_request:
types: [review_requested, ready_for_review]
types: [ready_for_review]
repository_dispatch:
types: [test-gmt-master-command]
# Schedule daily tests
schedule:
- cron: '0 0 * * *'
Expand Down Expand Up @@ -36,10 +38,31 @@ jobs:
# Checkout current git repository
- name: Checkout
uses: actions/[email protected]
if: github.event_name != 'repository_dispatch'
with:
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Generate token from GenericMappingTools bot
- name: Generate token from GenericMappingTools bot
uses: tibdex/github-app-token@v1
if: github.event_name == 'repository_dispatch'
id: generate-token
with:
app_id: ${{ secrets.APP_ID }}
private_key: ${{ secrets.APP_PRIVATE_KEY }}

# Checkout the pull request branch
- name: Checkout
uses: actions/checkout@v2
if: github.event_name == 'repository_dispatch'
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }}
ref: ${{ github.event.client_payload.pull_request.head.ref }}
# fecth all history so that setuptools-scm works
fetch-depth: 0

# Setup Miniconda
- name: Setup Miniconda
uses: conda-incubator/[email protected]
Expand Down Expand Up @@ -106,3 +129,12 @@ jobs:
with:
name: artifact-GMT-${{ matrix.gmt_git_ref }}-${{ runner.os }}
path: tmp-test-dir-with-unique-name

- name: Add reaction
uses: peter-evans/create-or-update-comment@v1
if: github.event_name == 'repository_dispatch'
with:
token: ${{ steps.generate-token.outputs.token }}
repository: ${{ github.event.client_payload.github.payload.repository.full_name }}
comment-id: ${{ github.event.client_payload.github.payload.comment.id }}
reaction-type: hooray
1 change: 1 addition & 0 deletions .github/workflows/slash-command-dispatch.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@ jobs:
token: ${{ steps.generate-token.outputs.token }}
commands: |
format
test-gmt-master
Copy link
Member

@weiji14 weiji14 Feb 1, 2021

Choose a reason for hiding this comment

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

Suggested change
test-gmt-master
test-gmt-dev

What do you think about changing the name to 'latest' to match the Github Actions name?

Copy link
Member Author

Choose a reason for hiding this comment

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

When we say "the latest GMT", we usually mean "the latest stable GMT release" (i.e., 6.1.1).

What about "GMT Dev Tests" and /test-gmt-dev?

Copy link
Member

@weiji14 weiji14 Feb 1, 2021

Choose a reason for hiding this comment

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

Yep, dev sounds good and is shorter. Please remember to change the PR title too.

Copy link
Member Author

Choose a reason for hiding this comment

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

Done in 6df8e34 and 72b7dfa

issue-type: pull-request
permission: none
4 changes: 2 additions & 2 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -62,8 +62,8 @@ On the *master* branch, the workflow also handles the documentation deployment:

2. `ci_tests_dev.yaml` (GMT Latest Tests on Linux/macOS/Windows).

This is only triggered when a review is requested or re-requested on a PR.
It is also scheduled to run daily on the *master* branch.
This is triggered when a PR is marked as "ready for review", or using the slash
command `/test-gmt-master`. It is also scheduled to run daily on the *master* branch.

3. `cache_data.yaml` (Caches GMT remote data files needed for GitHub Actions CI)

Expand Down