-
Notifications
You must be signed in to change notification settings - Fork 229
CI: Run "GMT Dev Tests" if PR is labeled with 'run/test-gmt-dev' #2960
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
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
71280ca
Remove the slash command 'test-gmt-dev'
seisman c24635b
Enable the workflow if the PR has the 'run/test-gmt-dev' label
seisman e1f66f5
Run the workflow when labeled
seisman 906f25b
Run the workflow when synchronized
seisman c141b3b
Update .github/workflows/ci_tests_dev.yaml
seisman File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,27 +1,25 @@ | ||
# Test PyGMT with GMT dev version on Linux/macOS/Windows | ||
# | ||
# This workflow runs regular PyGMT tests with the GMT dev version, and also | ||
# pre-release versions of several dependencies like NumPy, Pandas, Xarray, etc. | ||
# If any tests fail, it also uploads the diff images as workflow artifacts. | ||
# The GMT dev version is installed by fetching the latest source codes from | ||
# the GMT master branch and compiling. | ||
# This workflow runs regular PyGMT tests with the GMT dev version, and also pre-release | ||
# versions of several dependencies like NumPy, Pandas, Xarray, etc. If any tests fail, | ||
# it also uploads the diff images as workflow artifacts. The GMT dev version is | ||
# installed by fetching the latest source codes from the GMT master branch and | ||
# compiling. | ||
# | ||
# It is triggered when a pull request is marked as "ready as review", or using | ||
# the slash command `/test-gmt-dev`. It is also scheduled to run on Monday, | ||
# Wednesday, and Friday on the main branch. | ||
# It is triggered when a pull request is marked as "ready as review", or labeled with | ||
# 'run/test-gmt-dev'. It is also scheduled to run on Monday, Wednesday, and Friday on | ||
# the main branch. | ||
# | ||
name: GMT Dev Tests | ||
|
||
on: | ||
# push: | ||
# branches: [ main ] | ||
pull_request: | ||
types: [ready_for_review] | ||
types: [ opened, reopened, labeled, synchronize ] | ||
paths: | ||
- 'pygmt/**' | ||
- '.github/workflows/ci_tests_dev.yaml' | ||
repository_dispatch: | ||
types: [test-gmt-dev-command] | ||
# Schedule tests on Monday/Wednesday/Friday | ||
schedule: | ||
- cron: '0 0 * * 1,3,5' | ||
|
@@ -34,6 +32,7 @@ jobs: | |
test_gmt_dev: | ||
name: ${{ matrix.os }} - GMT ${{ matrix.gmt_git_ref }} | ||
runs-on: ${{ matrix.os }} | ||
if: github.event_name != 'pull_request' || contains(github.event.pull_request.labels.*.name, 'run/test-gmt-dev') | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
|
@@ -48,31 +47,10 @@ jobs: | |
# Checkout current git repository | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
if: github.event_name != 'repository_dispatch' | ||
with: | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
# Checkout the pull request branch | ||
- name: Checkout | ||
uses: actions/[email protected] | ||
if: github.event_name == 'repository_dispatch' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.event.client_payload.pull_request.head.repo.full_name }} | ||
ref: ${{ github.event.client_payload.pull_request.head.ref }} | ||
# fetch all history so that setuptools-scm works | ||
fetch-depth: 0 | ||
|
||
- name: Show job URL | ||
uses: peter-evans/[email protected] | ||
if: github.event_name == 'repository_dispatch' && runner.os == 'Linux' | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
repository: ${{ github.event.client_payload.github.payload.repository.full_name }} | ||
comment-id: ${{ github.event.client_payload.github.payload.comment.id }} | ||
body: https://github.com/${{ github.repository }}/actions/runs/${{ github.run_id }} | ||
|
||
# Install Micromamba with conda-forge dependencies | ||
- name: Setup Micromamba | ||
uses: mamba-org/[email protected] | ||
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Similar to my comment at #2958 (comment), should we still document this somewhere so that contributors/maintainers know to request that the
run/test-gmt-dev
label gets added to PRs that require it? Or just rely on maintainers to know when to set the label?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
See https://github.com/GenericMappingTools/pygmt/pull/2958/files#r1443950923.