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

Move CI to Github Actions #803

Merged
merged 1 commit into from Aug 12, 2020
Merged

Move CI to Github Actions #803

merged 1 commit into from Aug 12, 2020

Conversation

goanpeca
Copy link
Contributor

@goanpeca goanpeca commented May 11, 2020

Add win, mac and linux testing for Python 2.7, 3.6, 3.7 and 3.8

@goanpeca goanpeca self-assigned this May 11, 2020
@goanpeca goanpeca force-pushed the enh/github-actions branch 3 times, most recently from 0afbd1b to e98f556 Compare May 11, 2020 04:44
@goanpeca goanpeca changed the title WIP: Add github actions CI PR: Add github actions CI May 11, 2020
@goanpeca goanpeca force-pushed the enh/github-actions branch 3 times, most recently from 2927eaa to a9ce4f1 Compare May 11, 2020 05:33
@goanpeca goanpeca requested a review from ccordoba12 May 11, 2020 05:34
@goanpeca goanpeca force-pushed the enh/github-actions branch 2 times, most recently from 94e42fb to 734c65f Compare May 11, 2020 05:43
@goanpeca
Copy link
Contributor Author

goanpeca commented May 11, 2020

@gatesn could we disable appveyor and circle ci webhooks?
Also could we disable the "required" checks from the PRs?

https://github.com/palantir/python-language-server/settings/hooks (we do not have access to that :-). )

Thanks!

@goanpeca goanpeca force-pushed the enh/github-actions branch 5 times, most recently from 5f14429 to 52279d1 Compare June 15, 2020 23:48
@ccordoba12
Copy link
Contributor

@goanpeca, please restore the CircleCI checks and simply make them pass so I can merge this one.

@goanpeca
Copy link
Contributor Author

goanpeca commented Jun 17, 2020

@goanpeca, please restore the CircleCI checks and simply make them pass so I can merge this one.

They are restored, but they simply stoped running. Other PRs seem to be facing the same issue.

@jroitgrund
Copy link
Contributor

@goanpeca @ccordoba12 I removed the circle and appveyor webhooks, and made the checks non-required. Let's fix-up this branch to unblock further PRs.

@goanpeca
Copy link
Contributor Author

goanpeca commented Aug 4, 2020

@jroitgrund Thanks!, actually we need to keep the circleci hooks, since there we have the job in charge of making a release when a new tag is published. And the release process is tied to some passwords that I assume were configured as environment variables on circle ci.

I could move the process to Github actions as well, but some extra configuration would be needed on the secrest sections of setttings on this repo so we can use those PyPI passwords/tokens in the github action workflow.

@goanpeca goanpeca marked this pull request as draft August 4, 2020 13:09
@ccordoba12 ccordoba12 added this to the v0.35.0 milestone Aug 12, 2020
@ccordoba12 ccordoba12 changed the title PR: Add github actions CI PR: Move CI to Github Actions Aug 12, 2020
@ccordoba12 ccordoba12 changed the title PR: Move CI to Github Actions Move CI to Github Actions Aug 12, 2020
@ccordoba12 ccordoba12 marked this pull request as ready for review August 12, 2020 19:16
Copy link
Contributor

@ccordoba12 ccordoba12 left a comment

Choose a reason for hiding this comment

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

Thanks @goanpeca!

@ccordoba12 ccordoba12 merged commit 283073b into develop Aug 12, 2020
@ccordoba12 ccordoba12 deleted the enh/github-actions branch August 12, 2020 19:17
@jroitgrund
Copy link
Contributor

@gatesn do you have a copy of the secrets from circle so we can add them as github actions secrets?

@gatesn
Copy link
Contributor

gatesn commented Sep 8, 2020

They should be stored in passwords.y.l

@jroitgrund
Copy link
Contributor

@goanpeca I added PIPY_HOST, PIPY_PASSWORD, and PIPY_USERNAME as GH secrets, so I think all we need is a GitHub action mirroring https://github.com/palantir/python-language-server/blob/develop/.circleci/config.yml#L36-L41

@goanpeca
Copy link
Contributor Author

Thanks @jroitgrund

I will take a look

@ccordoba12
Copy link
Contributor

@jroitgrund, could you also add TWINE_USERNAME and TWINE_PASSWORD?

I think that it's easier to use twine to upload the wheel and tarball instead of setup.py, and those env vars are needed for that according to

https://twine.readthedocs.io/en/latest/#environment-variables

@jroitgrund
Copy link
Contributor

jroitgrund commented Sep 10, 2020

Done! We were previously publishing via https://upload.pypi.org/legacy/ but I guess we won't need to anymore if we switch to twine.

@ccordoba12
Copy link
Contributor

Thanks a lot @jroitgrund! I'll try to add support for twine on Github actions tonight (CDT) if @goanpeca doesn't it add before.

@goanpeca
Copy link
Contributor Author

goanpeca commented Sep 10, 2020

@jroitgrund from a security standpoint, it would be better to use tokens from PyPI, instead of username and password.

If you go to
https://pypi.org/manage/project/python-language-server/settings/

(Showing an example of another project)

Screen Shot 2020-09-10 at 9 37 09

And then clicking on Create a Token ...

image

That way we can use this step on the Github Workflow

    - name: Publish Client release
      env:
        TWINE_USERNAME: __token__
        TWINE_PASSWORD: ${{ secrets.PYPI_PYLS_TOKEN }}
      run: |
        python -m twine upload dist/*

No PIPY_HOST, PIPY_PASSWORD, and PIPY_USERNAME needs to be set/exposed, only PYPI_PYLS_TOKEN and it will only have access to publish the python-language-server package.

@jroitgrund
Copy link
Contributor

Good call, done.

@goanpeca
Copy link
Contributor Author

Thanks @jroitgrund! Is the name PYPI_PYLS_TOKEN? I just pull that out of the blue.

@jroitgrund
Copy link
Contributor

Yep.

@ccordoba12
Copy link
Contributor

0.35.0 is finally out!

https://pypi.org/project/python-language-server/0.35.0/

Thanks @goanpeca for the tips and @jroitgrund for setting things up on your side.

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.

None yet

4 participants