Skip to content

Replace travis with github-actions #322

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

Closed
ssbarnea opened this issue Jul 30, 2020 · 14 comments
Closed

Replace travis with github-actions #322

ssbarnea opened this issue Jul 30, 2020 · 14 comments
Assignees
Labels
skip-changelog Can be missed from the changelog. test This PR relates to tests, QA, CI.

Comments

@ssbarnea
Copy link
Member

ssbarnea commented Jul 30, 2020

I created this in because I want to exemplify why I think in 2020, it makes more sense to use Github Action than Travis.

There is nothing preventing us from running both in parallel for a longer period of time, and even ignoring the results from one of them if we want.

I can easily raise a PTs I already did this for lots of repos and I know the tricks.

Update 2020-10

Changed scope from trying... to switching...

@BeyondEvil
Copy link
Contributor

I created this in because I want to exemplify why I think in 2020, it makes more sense to use Github Action than Travis.

There is nothing preventing us from running both in parallel for a longer period of time, and even ignoring the results from one of them if we want.

I can easily raise a PTs I already did this for lots of repos and I know the tricks.

I would really appreciate a PR with some Github Actions! 😊

It would be awesome if you could comment it extensively to expedite the learning curve for me (and future contributors). Especially any tricks. 👍

@gnikonorov
Copy link
Member

+1 to @BeyondEvil's response

@ssbarnea
Copy link
Member Author

I think we all seen how nice github actions works. Maybe is time to effectively drop Travis and switch the release to github actions. Less complexity can only help the project.

@BeyondEvil @davehunt What do you think?

I cannot do it myself because I do not have access to project settings or pypi. One needs to add project-specific-tokens for both pypi instances that look like:

Ideally we should use a bot account for that, but I see none configured. You could reuse the pytest-dev bot for that.

@gnikonorov
Copy link
Member

Regarding the above, I think we should drop travis and move to github actions

@ssbarnea ssbarnea changed the title proposal: evaluate github-actions as alternative to travis Replace travis with github-actions Oct 18, 2020
@ssbarnea ssbarnea self-assigned this Oct 18, 2020
@ssbarnea ssbarnea added skip-changelog Can be missed from the changelog. test This PR relates to tests, QA, CI. labels Oct 18, 2020
@BeyondEvil
Copy link
Contributor

BeyondEvil commented Oct 18, 2020

I'm happy to make the switch over to only using GHA. I also think using the pytest-dev bot is a good idea as long as project owners have the access they need to it.

With that said, @davehunt has the final say.

@davehunt
Copy link
Collaborator

With that said, @davehunt has the final say.

Don't let me get in the way of the using the best available tools. If you're all happy, I'm certainly not going to stop you.

@BeyondEvil
Copy link
Contributor

Where can I see the pytest-dev in use with GHA? @ssbarnea

@BeyondEvil
Copy link
Contributor

BeyondEvil commented Oct 19, 2020

I need your pypi username @ssbarnea

What's the username of the pytest-dev bot @nicoddemus ? Will I have access to it? Do I need access to it (to make it the release bot)? I guess (see below) I at least need the bot's API token.

We should use this and this

@nicoddemus
Copy link
Member

The bot right now doesn't have a user name on PyPI yet, there's been some discussion in pytest-dev/meta#4 but that has stalled.

What I usually do is create a scoped token in my own account and use that; anyone with release rights on PyPI can create and replace that token if needed.

@BeyondEvil
Copy link
Contributor

Ah, got it. Thanks @nicoddemus 🙏

@gnikonorov
Copy link
Member

It looks like uploading to test pypi fails, @ssbarnea:

/usr/bin/docker run --name e5c35918e63663af24e6ab6512533d077c8e0_b82f1c --label 1e5c35 --workdir /github/workspace --rm -e PY_COLORS -e TOXENV -e pythonLocation -e LD_LIBRARY_PATH -e INPUT_PASSWORD -e INPUT_REPOSITORY_URL -e INPUT_USER -e INPUT_PACKAGES_DIR -e INPUT_VERIFY_METADATA -e INPUT_SKIP_EXISTING -e INPUT_VERBOSE -e HOME -e GITHUB_JOB -e GITHUB_REF -e GITHUB_SHA -e GITHUB_REPOSITORY -e GITHUB_REPOSITORY_OWNER -e GITHUB_RUN_ID -e GITHUB_RUN_NUMBER -e GITHUB_RETENTION_DAYS -e GITHUB_ACTOR -e GITHUB_WORKFLOW -e GITHUB_HEAD_REF -e GITHUB_BASE_REF -e GITHUB_EVENT_NAME -e GITHUB_SERVER_URL -e GITHUB_API_URL -e GITHUB_GRAPHQL_URL -e GITHUB_WORKSPACE -e GITHUB_ACTION -e GITHUB_EVENT_PATH -e GITHUB_PATH -e GITHUB_ENV -e RUNNER_OS -e RUNNER_TOOL_CACHE -e RUNNER_TEMP -e RUNNER_WORKSPACE -e ACTIONS_RUNTIME_URL -e ACTIONS_RUNTIME_TOKEN -e ACTIONS_CACHE_URL -e GITHUB_ACTIONS=true -e CI=true -v "/var/run/docker.sock":"/var/run/docker.sock" -v "/home/runner/work/_temp/_github_home":"/github/home" -v "/home/runner/work/_temp/_github_workflow":"/github/workflow" -v "/home/runner/work/_temp/_runner_file_commands":"/github/file_commands" -v "/home/runner/work/pytest-html/pytest-html":"/github/workspace" 1e5c35:918e63663af24e6ab6512533d077c8e0  "__token__" "***" "https://test.pypi.org/legacy/" "dist" "true" "false" "false"
Checking dist/pytest_html-2.1.2.dev46+gca5ddbc-py3-none-any.whl: PASSED, with warnings
  warning: `long_description_content_type` missing. defaulting to `text/x-rst`.
Checking dist/pytest-html-2.1.2.dev46+gca5ddbc.tar.gz: PASSED, with warnings
  warning: `long_description_content_type` missing. defaulting to `text/x-rst`.
Uploading distributions to https://test.pypi.org/legacy/
Uploading pytest_html-2.1.2.dev46+gca5ddbc-py3-none-any.whl

  0%|          | 0.00/31.3k [00:00<?, ?B/s]
100%|██████████| 31.3k/31.3k [00:00<00:00, 99.4kB/s]
NOTE: Try --verbose to see response content.
HTTPError: 400 Bad Request from https://test.pypi.org/legacy/
'2.1.2.dev46+gca5ddbc' is an invalid value for Version. Error: Can't use PEP 440 local versions. See https://packaging.python.org/specifications/core-metadata for more information.

@gnikonorov
Copy link
Member

Maybe we can change the package name to be a pre release or devlopmental release identifier?

@ssbarnea
Copy link
Member Author

ssbarnea commented Nov 3, 2020

I know what to do, I will do it tomorrow morning. Is the setuptools-scm config stuff.

@BeyondEvil
Copy link
Contributor

Is this fixed by #364 @ssbarnea ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
skip-changelog Can be missed from the changelog. test This PR relates to tests, QA, CI.
Projects
None yet
Development

No branches or pull requests

5 participants