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 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
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`: automatically format and lint the code
- `/test-gmt-dev`: run full tests on the latest GMT development version
38 changes: 35 additions & 3 deletions .github/workflows/ci_tests_dev.yaml
Original file line number Diff line number Diff line change
@@ -1,13 +1,15 @@
# This workflow installs PyGMT dependencies, builds documentation and runs tests on GMT latest
# This workflow installs PyGMT dependencies, builds documentation and runs tests on GMT dev version
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions

name: GMT Latest Tests
name: GMT Dev Tests

on:
# push:
# branches: [ master ]
pull_request:
types: [review_requested, ready_for_review]
types: [ready_for_review]
repository_dispatch:
types: [test-gmt-dev-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-dev
issue-type: pull-request
permission: none
6 changes: 3 additions & 3 deletions MAINTENANCE.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,10 +60,10 @@ On the *master* branch, the workflow also handles the documentation deployment:
*master* branch onto the `dev` folder of the *gh-pages* branch.
* Updated the `latest` documentation link to the new release.

2. `ci_tests_dev.yaml` (GMT Latest Tests on Linux/macOS/Windows).
2. `ci_tests_dev.yaml` (GMT Dev 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-dev`. 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
4 changes: 2 additions & 2 deletions README.rst
Original file line number Diff line number Diff line change
Expand Up @@ -13,8 +13,8 @@ PyGMT
.. image:: https://github.com/GenericMappingTools/pygmt/workflows/Tests/badge.svg
:alt: GitHub Actions Tests status
:target: https://github.com/GenericMappingTools/pygmt/actions?query=workflow%3ATests
.. image:: https://github.com/GenericMappingTools/pygmt/workflows/GMT%20Latest%20Tests/badge.svg
:alt: GitHub Actions GMT Latest Tests status
.. image:: https://github.com/GenericMappingTools/pygmt/workflows/GMT%20Dev%20Tests/badge.svg
:alt: GitHub Actions GMT Dev Tests status
:target: https://github.com/GenericMappingTools/pygmt/actions?query=workflow%3A%22GMT+Latest+Tests%22
.. image:: https://img.shields.io/codecov/c/github/GenericMappingTools/pygmt/master.svg?style=flat-square
:alt: Test coverage status
Expand Down