-
-
Notifications
You must be signed in to change notification settings - Fork 144
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
Migrate to GitHub Actions #270
Merged
Changes from all commits
Commits
Show all changes
5 commits
Select commit
Hold shift + click to select a range
b540cea
Add GitHub Actions test workflow.
jezdez 64eefae
Fix an issue with an old version of dj-email-url.
jezdez eea5b9a
Remove travis cruft.
jezdez 5053da4
Add release workflow.
jezdez f5bebd4
Add fail_ci_if_error to test workflow.
jezdez File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
if: github.repository == 'jazzband/django-configurations' | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
with: | ||
fetch-depth: 0 | ||
|
||
- name: Set up Python | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: 3.8 | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: release-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
release- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install -U pip | ||
python -m pip install -U setuptools twine wheel | ||
|
||
- name: Build package | ||
run: | | ||
python setup.py --version | ||
python setup.py sdist --format=gztar bdist_wheel | ||
twine check dist/* | ||
|
||
- name: Upload packages to Jazzband | ||
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags') | ||
uses: pypa/gh-action-pypi-publish@master | ||
with: | ||
user: jazzband | ||
password: ${{ secrets.JAZZBAND_RELEASE_KEY }} | ||
repository_url: https://jazzband.co/projects/django-configurations/upload |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,49 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
max-parallel: 5 | ||
matrix: | ||
python-version: ['2.7', '3.5', '3.6', '3.7', '3.8', 'pypy3'] | ||
|
||
steps: | ||
- uses: actions/checkout@v2 | ||
|
||
- name: Set up Python ${{ matrix.python-version }} | ||
uses: actions/setup-python@v2 | ||
with: | ||
python-version: ${{ matrix.python-version }} | ||
|
||
- name: Get pip cache dir | ||
id: pip-cache | ||
run: | | ||
echo "::set-output name=dir::$(pip cache dir)" | ||
|
||
- name: Cache | ||
uses: actions/cache@v2 | ||
with: | ||
path: ${{ steps.pip-cache.outputs.dir }} | ||
key: | ||
${{ matrix.python-version }}-v1-${{ hashFiles('**/setup.py') }} | ||
restore-keys: | | ||
${{ matrix.python-version }}-v1- | ||
|
||
- name: Install dependencies | ||
run: | | ||
python -m pip install --upgrade pip | ||
python -m pip install --upgrade tox tox-gh-actions | ||
|
||
- name: Tox tests | ||
run: | | ||
tox -v | ||
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: Python ${{ matrix.python-version }} | ||
fail_ci_if_error: true |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original command for Travis has a bunch of options which aren't used now:
I've not looked those up, but it doesn't seem to have affected coverage? In fact, it's gone up a bit.
I don't think there's analogues for all those options with the action, but at least
flags
can be added in thewith:
section:https://github.com/codecov/codecov-action
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Right, I looked at them, I only see
--required
easy to reply, withfail_ci_if_error = true
.-X
to disable a feature seems to be not supported by the action.coverage.xml
is automatically found already.--flags
with the tox environment isn't useful anymore since in the new GHA test workflow the test matrix doesn't use TOXENV anymore, so couldn't be used. Unless I'm misunderstanding the notation of${TOXENV//-/ }
? Does this make sense to you?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm also not sure what
${TOXENV//-/ }
means, but I don't see any$TOXENV
actually used in the old Travis CI file, so probably fine to skip 👍