GenericMappingTools / pygmt

A Python interface for the Generic Mapping Tools.
https://www.pygmt.org
BSD 3-Clause "New" or "Revised" License
758 stars 220 forks source link

Migrate Travis CI jobs to GitHub Actions #566

Closed seisman closed 3 years ago

seisman commented 4 years ago

Description of the desired feature

We recently migrated all the CI testings and style checks from Azure Pipelines to GitHub Actions. Currently, we're using both GitHub Actions and Travis CI.

The Travis CI is doing following jobs:

The first one is already covered in the GitHub Actions, so it's OK to just remove them from Travis CI.

The 2nd and the 3rd one should be migrated to GitHub Actions.

Are you willing to help implement and maintain this feature? Yes, but contributions are welcome.

weiji14 commented 4 years ago

No strong objections to this, we should do all three in separate PRs. Only concern would be that this makes up totally dependent on Github, which might be problematic if GIthub servers go down (but that's a bigger issue in itself).

The first one is already covered in the GitHub Actions, so it's OK to just remove them from Travis CI.

Yep. Or we could keep one single test around. Maybe a test for a nightly Python build for the upcoming Python 3.9?

The 2nd and the 3rd one should be migrated to GitHub Actions.

On the 2nd one, see https://github.com/GenericMappingTools/website/pull/65 as an example on documentation build/deploy.

For the 3rd one (Publish to PyPI), we could use https://github.com/marketplace/actions/pypi-publish, and maybe test it on https://test.pypi.org (instead of the main pypi.org website) first to be sure we don't break anything.

seisman commented 4 years ago

The first one is already covered in the GitHub Actions, so it's OK to just remove them from Travis CI.

Yep. Or we could keep one single test around. Maybe a test for a nightly Python build for the upcoming Python 3.9?

We rely on packages from conda-forge. If conda-forge doesn't provide numpy, pandas and xarray packages for Python 3.9, I don't think we can get the testings running.

The 2nd and the 3rd one should be migrated to GitHub Actions.

On the 2nd one, see GenericMappingTools/website#65 as an example on documentation build/deploy.

We still need the https://github.com/fatiando/continuous-integration/blob/master/travis/deploy-gh-pages.sh script, because documentation of different versions are stored in separated directories.

For the 3rd one (Publish to PyPI), we could use https://github.com/marketplace/actions/pypi-publish, and maybe test it on https://test.pypi.org (instead of the main pypi.org website) first to be sure we don't break anything.

To make it work, we may need a PyPI token.

seisman commented 4 years ago

We still need the https://github.com/fatiando/continuous-integration/blob/master/travis/deploy-gh-pages.sh script, because documentation of different versions are stored in separated directories.

We may not need the script, as the peaceiris/actions-gh-pages action supports "deploying to a subdirectory".

seisman commented 4 years ago

FYI, I've added a pypi token in secret pypi_password, which can be used in the https://github.com/marketplace/actions/pypi-publish action.