Skip to content
This repository has been archived by the owner on Aug 11, 2023. It is now read-only.

Use GitHub Actions #502

Merged
merged 3 commits into from
Feb 5, 2021
Merged

Use GitHub Actions #502

merged 3 commits into from
Feb 5, 2021

Conversation

pllim
Copy link
Member

@pllim pllim commented Jan 13, 2021

Fix #499 .

Proof of concept as follows:

Some notes:

  • I separated out CI and deploy based on recommendation from GitHub security lab.
  • render job is not in a matrix because if inside a step isn't respected in a matrixed workflow, and you don't want to upload the artifact unnecessarily.
  • Turns out checkout action is pretty nice as you don't need special SSH key by using it. But you do need a special token that allows "update github action workflows" and I already set that up for you. Would be nice if we can replace it with some org level token but I don't have access to that (some site says that is not even possible, so I am not sure).

Note to self:

@pllim pllim added this to the 3.1 milestone Jan 13, 2021
@pllim pllim requested a review from Cadair January 13, 2021 20:23
@pllim pllim mentioned this pull request Jan 13, 2021
2 tasks
.github/workflows/deploy.yml Show resolved Hide resolved
@pllim pllim requested a review from bsipocz January 25, 2021 18:19
@pllim
Copy link
Member Author

pllim commented Jan 25, 2021

I added @bsipocz as a reviewer since she expressed interest to review. FYI and thanks!

Copy link
Member

@bsipocz bsipocz left a comment

Choose a reason for hiding this comment

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

Overall looks good. The only point where I don't fully see whether things work or not is the different context, but it's not the issue of these actions but probably a bug in the template.

@bsipocz
Copy link
Member

bsipocz commented Jan 29, 2021

Here is e.g. what I mean: when the parent is sunpy, I think this test header, and possibly other stuff as well, don't seem to be right. I recall this came up already in the header, or test runner, or somewhere (e.g. astropy should not be listed in the top, but rather as a dependency below, along with dependencies declared for "packagename", rather than a hard wired list). Also, I don't see any indications that the extra context is being tested, so with this matrix we only test that it doesn't error out?:

============================= test session starts ==============================
platform linux -- Python 3.8.6, pytest-6.2.1, py-1.10.0, pluggy-0.13.1
cachedir: .tox/py38-test/.pytest_cache

Running tests with Astropy version 4.2.
Running tests in packagename docs.

Date: 2021-01-13T19:45:18

Platform: Linux-5.4.0-1032-azure-x86_64-with-glibc2.2.5

Executable: /home/runner/work/package-template/test/packagename/.tox/py38-test/bin/python

Full Python Version: 
3.8.6 (default, Oct 28 2020, 13:08:18) 
[GCC 7.5.0]

encodings: sys: utf-8, locale: UTF-8, filesystem: utf-8
byteorder: little
float info: dig: 15, mant_dig: 15

Package versions: 
Numpy: 1.19.5
Scipy: not available
Matplotlib: not available
h5py: not available
Pandas: not available

Using Astropy options: remote_data: none.

rootdir: /home/runner/work/package-template/test/packagename, configfile: setup.cfg
plugins: hypothesis-6.0.1, arraydiff-0.3, doctestplus-0.8.0, astropy-header-0.1.2, remotedata-0.3.2, cov-2.10.1, filter-subpackage-0.1.1, openfiles-0.5.0
collected 3 items

@pllim
Copy link
Member Author

pllim commented Jan 29, 2021

test header

Yes, that is a separate issue already explained at astropy/pytest-astropy-header#15 (comment) .

indications that the extra context is being tested

I am not sure what you mean. Compared to https://travis-ci.com/github/astropy/package-template/jobs/430750636 (where the parent is sunpy also), there are only 3 tests. For Actions, I run the codestyle and build_docs first and you can see the results if you expand the relevant steps before the tests.

@bsipocz
Copy link
Member

bsipocz commented Jan 29, 2021

@pllim - This PR is certainly replaces everything that we did with travis, and more. All I'm saying is that I don't see whether the extra contexts are being tested at all, beyond checking that no errors are raised using them. Probably I should have just opened a separate issue for it, as it clearly goes beyond this PR.

@pllim
Copy link
Member Author

pllim commented Feb 4, 2021

Yes, the matrix itself definitely can be improved for future PR. Shall we merge then? 😸

@bsipocz
Copy link
Member

bsipocz commented Feb 5, 2021

Oh, sure, I didn't mean that to be a blocker here more just as something I noticed, as this PR already improves the current status.

@pllim pllim merged commit 6dbb3f5 into astropy:cookiecutter Feb 5, 2021
@pllim pllim deleted the last-actions-hero branch February 5, 2021 16:33
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

switch from Travis
3 participants