Skip to content
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

Enable CI via GH actions #129

Merged
merged 2 commits into from
Aug 31, 2022
Merged

Enable CI via GH actions #129

merged 2 commits into from
Aug 31, 2022

Conversation

awvwgk
Copy link
Member

@awvwgk awvwgk commented Aug 30, 2022

  • Python 3.5 / 3.6 using preinstalled Python versions on runner
  • Python 3.7 to 3.10 using conda-forge Python

TODO

  • coverage upload to coveralls
  • pypi upload (different workflow?)

Closes #128

@awvwgk awvwgk mentioned this pull request Aug 30, 2022
@gnikit
Copy link
Member

gnikit commented Aug 30, 2022

I would do codecov.io instead of coveralls and for PyPi we can copy this https://github.com/gnikit/fortls/blob/master/.github/workflows/python-publish.yml but we will have to get @pseewald to upload the tokens as secrets to the repo.

@gnikit
Copy link
Member

gnikit commented Aug 30, 2022

Also, we might want to consider first swapping to setup.cfg, pyproject.toml, setup.py 3-file stubs and reshaping the testing (not in this PR though)

@awvwgk
Copy link
Member Author

awvwgk commented Aug 30, 2022

I would do codecov.io instead of coveralls

It looks like this project originally used coveralls, I would be fine with switching to codecov as well. @pseewald any preference?

Also, we might want to consider first swapping to setup.cfg, pyproject.toml, setup.py 3-file stubs and reshaping the testing

Let's get the CI running first before we start changing things.

@gnikit
Copy link
Member

gnikit commented Aug 30, 2022

We might have to go and fetch the test data from the outside repos manually from the git history. I can't find all the tarball archives cp2k, cron, FLAP, rosseta, etc. Sorry my bad, I was looking at the wrong place.

We don't have to fetch the tarballs, we can just clone I recon.

@awvwgk
Copy link
Member Author

awvwgk commented Aug 30, 2022

We might have to go and fetch the test data from the outside repos manually from the git history. I can't find all the tarball archives cp2k, cron, FLAP, rosseta, etc.

They are fetched via git-archive tarballs from the fprettify-test branch in @pseewald's forks of the respective projects.

@awvwgk awvwgk marked this pull request as ready for review August 31, 2022 07:27
@awvwgk awvwgk requested review from gnikit and pseewald August 31, 2022 11:09
Copy link
Member

@gnikit gnikit left a comment

Choose a reason for hiding this comment

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

Looks good, we need to upload the Secrets but that is only relevant for Publishing

uses: pypa/gh-action-pypi-publish@master
with:
user: __token__
password: ${{ secrets.TEST_PYPI_API_TOKEN }}
Copy link
Member

Choose a reason for hiding this comment

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

@pseewald If you can generate the tokens from PyPi Test and PyPi and store them as secrets with the name TEST_PYPI_API_TOKEN and PYPI_API_TOKEN, then this action can be used for publishing i.e. no need to use twine

Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not familiar with that process. Alternatively, we move fprettify soon to @fortran-lang, then you can take care of this as well (if you agree)?

Copy link
Member

Choose a reason for hiding this comment

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

This is just a nice way to publish and upload packages to PyPi via the GitHub UI. It calls twine in the background so it needs a valid PyPi token to successfully upload the package to pseewald

This is a similar example to how the Language Server does it: https://github.com/gnikit/fortls/blob/25b793c224ce888aa533928e75386fba565d4942/.github/workflows/python-publish.yml#L34-L46

I am happy for fprettify to move to fortran-lang. Still in that case the publishing issue would persist. You would have to add the Fortran-lang PyPi account as a maintainer or owner to be able to publish the package on PyPi.

.github/workflows/test.yml Show resolved Hide resolved
@awvwgk awvwgk merged commit f5061b5 into fortran-lang:master Aug 31, 2022
@awvwgk awvwgk deleted the gha branch August 31, 2022 12:04
@pseewald
Copy link
Collaborator

pseewald commented Oct 3, 2022

@awvwgk @gnikit Thanks a lot of taking care of this, great work! Sorry for replying late.

I would be fine with switching to codecov as well. @pseewald any preference?

I have no preference due to lack of experience regarding these tools, please use whatever you prefer.

We might have to go and fetch the test data from the outside repos manually from the git history. I can't find all the tarball archives cp2k, cron, FLAP, rosseta, etc.

Sorry for this cumbersome mechanism, I'll soon make a pr for #140 where I change the way external Fortran code is added for tests. I also suggest that we use the official repositories instead of custom forks (I'll also take care of this in #140).

@gnikit
Copy link
Member

gnikit commented Oct 5, 2022

Sorry for this cumbersome mechanism, I'll soon make a pr for #140 where I change the way external Fortran code is added for tests. I also suggest that we use the official repositories instead of custom forks (I'll also take care of this in #140).

Thanks for taking care of this @pseewald, that's great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Re-enable automatic tests
3 participants