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

Travis migrations to GitHub actions #353

Open
17 of 21 tasks
consideRatio opened this issue Nov 9, 2020 · 2 comments
Open
17 of 21 tasks

Travis migrations to GitHub actions #353

consideRatio opened this issue Nov 9, 2020 · 2 comments

Comments

@consideRatio
Copy link
Member

consideRatio commented Nov 9, 2020

With no reply from Travis still regarding #351, @manics @betatim and I have got started on some migrations.

Reference example

I have worked to provide relevant comments in the GitHub Workflow defined in jupyterhub/jupyterhub#3246 to be of use as a reference example of how things work.

Tips

  • Python setup / Node setup: use the setup-python and setup-node actions, they run in less than a second because of a smart cache in the base environment.
  • SSH key setup: to setup a SSH key for pushes git repos etc or just secrets in general, see how it can be done here.
  • LANG env var: GitHub Workflow's aren't UTF-8 friendly by default, you may need to set it explicitly to C.UTF-8 sometimes.
    env:
      # UTF-8 content may be interpreted as ascii and causes errors without this.
      LANG: C.UTF-8
  • fail-fast: false: By setting jobs.<name>.strategy.fail-fast: false you avoid letting all variations of the job stop when one of them fail.
  • Job run with different parameterization: by using jobs.<name>.strategy.matrix you can let a single job definition run multiple times using permutation of variables, or just use a list of predefined sets of combinations to include using jobs.<name>.strategy.matrix.include.
  • if conditions: Both steps and jobs can have if conditions set on them. Example:
    steps:
      - name: Start a database server (${{ matrix.db }})
        if: ${{ matrix.db }}
  • PyPI releases: see migrate from travis to github actions oauthenticator#383
  • npm releases: see travis -> github actions configurable-http-proxy#275
  • GitHub actions badge for README files: The Workflow name is case sensitive and is what its named within the file, not the file name itself, watch out!
    GitHub Workflow Status
    [![GitHub Workflow Status](https://img.shields.io/github/workflow/status/jupyterhub/chartpress/Test?logo=github)](https://github.com/jupyterhub/chartpress/actions)
  • Run workflow button: By setting on.workflow_dispatch you can get a button to manually run a workflow.
    image
  • Colors: GitHub Workflow's make git, pytest, etc not realize colors are supported, so we need to explicitly do git --no-pager diff --color and pytest --color=yes for example when using those commands.
    This all relates to this issue: Not a tty actions/runner#241, which wasn't an issue in Travis CI
  • edit and add more here

Repo migration overview

I've added a pypi_password secret for all pypi packages in this list as the jupyterhub-bot PyPI user except for the jupyterhub repo.

@consideRatio
Copy link
Member Author

image

GitHub actions provides seemingly unlimited parallell builds! Omg!

@consideRatio
Copy link
Member Author

@minrk can you add jupyterhub-bot on PyPI as a maintainer of dockerspawner https://pypi.org/project/dockerspawner/?

rkdarst added a commit to rkdarst/batchspawner that referenced this issue Dec 2, 2020
- Test (with pytest) using Github Actions, since Travis is now
  limiting free projects.  See
  jupyterhub/team-compass#353 .
- Almost a direct translation of current .travis.yml, only minor edits
  to bring it up to date with some versions.
- Remove .travis.yml
- Review:
  - I don't know if codecov is used for anything
  - Is everyone happy with the python/JH version coverage?
  - General check for best practices
rkdarst added a commit to rkdarst/batchspawner that referenced this issue Dec 2, 2020
- Test (with pytest) using Github Actions, since Travis is now
  limiting free projects.  See
  jupyterhub/team-compass#353 .
- Almost a direct translation of current .travis.yml, only minor edits
  to bring it up to date with some versions.
- Remove .travis.yml
- Review:
  - I don't know if codecov is used for anything
  - Is everyone happy with the python/JH version coverage?
  - General check for best practices
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

1 participant