-
Notifications
You must be signed in to change notification settings - Fork 244
Move release from travis to github actions #360
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
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,6 +12,8 @@ on: | |
- >- | ||
** | ||
pull_request: | ||
schedule: | ||
- cron: 1 0 * * * # Run daily at 0:01 UTC | ||
|
||
jobs: | ||
build_python: | ||
|
@@ -127,3 +129,70 @@ jobs: | |
grunt test | ||
env: | ||
CI: true | ||
publish: | ||
name: Publish to PyPI registry | ||
needs: | ||
- build_python | ||
- build_javascript | ||
runs-on: ubuntu-latest | ||
|
||
env: | ||
PY_COLORS: 1 | ||
TOXENV: packaging | ||
|
||
steps: | ||
- name: Switch to using Python 3.6 by default | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.6 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Is there a reason why we're using 3.6 and not a newer version @ssbarnea @gnikonorov ? There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I'm pretty sure Sorin wanted to support the oldest possible version that the devs/contributors may use. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Yes, use of oldest supported is usually better than newest in order to avoid regressions. Based on experience using oldest proved to catch more issues than the newest, especially in this area. Any CI failure that prevents a bad release is better than making a user unhappy. Note to myself: add comments on action tasks like this documenting their purpose. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Thanks @ssbarnea! Makes sense. 👍 |
||
- name: Install tox | ||
run: python -m pip install --user tox | ||
- name: Check out src from Git | ||
uses: actions/checkout@v2 | ||
with: | ||
# Get shallow Git history (default) for tag creation events | ||
# but have a complete clone for any other workflows. | ||
# Both options fetch tags but since we're going to remove | ||
# one from HEAD in non-create-tag workflows, we need full | ||
# history for them. | ||
fetch-depth: >- | ||
ssbarnea marked this conversation as resolved.
Show resolved
Hide resolved
|
||
${{ | ||
( | ||
github.event_name == 'create' && | ||
github.event.ref_type == 'tag' | ||
) && | ||
1 || 0 | ||
}} | ||
- name: Drop Git tags from HEAD for non-tag-create events | ||
nicoddemus marked this conversation as resolved.
Show resolved
Hide resolved
|
||
if: >- | ||
github.event_name != 'create' || | ||
github.event.ref_type != 'tag' | ||
run: >- | ||
git tag --points-at HEAD | ||
| | ||
xargs git tag --delete | ||
- name: Build dists | ||
run: python -m tox | ||
- name: Publish to test.pypi.org | ||
if: >- | ||
( | ||
github.event_name == 'push' && | ||
github.ref == format( | ||
'refs/heads/{0}', github.event.repository.default_branch | ||
) | ||
) || | ||
( | ||
github.event_name == 'create' && | ||
github.event.ref_type == 'tag' | ||
) | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.testpypi_password }} | ||
repository_url: https://test.pypi.org/legacy/ | ||
- name: Publish to pypi.org | ||
if: >- # "create" workflows run separately from "push" & "pull_request" | ||
github.event_name == 'create' && | ||
github.event.ref_type == 'tag' | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
password: ${{ secrets.pypi_password }} |
This file was deleted.
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,15 +23,12 @@ If you're not using `Pipenv`_, to install `pre-commit`, run: | |
Automated Testing | ||
----------------- | ||
|
||
All pull requests and merges are tested in `Travis CI <https://travis-ci.org/>`_ | ||
based on the ``.travis.yml`` file. | ||
All pull requests and merges are tested in `GitHub Actions <https://github.com/pytest-dev/pytest-html/actions>`_ | ||
which are defined inside ``.github`` folder. | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. nitpick: 'inside the |
||
|
||
Usually, a link to your specific travis build appears in pull requests, but if | ||
not, you can find it on the | ||
`pull requests page <https://travis-ci.org/pytest-dev/pytest-html/pull_requests>`_ | ||
|
||
The only way to trigger Travis CI to run again for a pull request, is to submit | ||
another change to the pull branch. | ||
To retrigger CI to run again for a pull request, you either use dropdown | ||
option, close and reopen pull-request or to just update the branch containing | ||
it. | ||
|
||
You can do this with `git commit --allow-empty` | ||
|
||
|
@@ -67,6 +64,6 @@ Follow these steps to release a new version of the project: | |
5. Once merged, update your local master again (``git pull --rebase upstream master``) | ||
6. Tag the release with the new release version (``git tag v<new tag>``) | ||
7. Push the tag (``git push upstream --tags``) | ||
8. Done. You can monitor the progress on `Travis <https://travis-ci.org/pytest-dev/pytest-html/>`_ | ||
8. Done. Check `CI <https://github.com/pytest-dev/pytest-html/actions>`_ for release progress. | ||
|
||
.. _Pipenv: https://pipenv.pypa.io/en/latest/ |
Uh oh!
There was an error while loading. Please reload this page.