-
-
Notifications
You must be signed in to change notification settings - Fork 80
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. #72
Merged
Changes from all commits
Commits
Show all changes
7 commits
Select commit
Hold shift + click to select a range
e9a2c84
Migrate to GitHub Actions.
jezdez 89532e7
Add release workflow.
jezdez b62ad7b
Updated URLs.
jezdez 26caf6e
Don't hide tests coverage.
jezdez 1fa4d1a
Remove Travis config.
jezdez 05be483
Add Trove classifiers.
jezdez c1b77d9
Update minimum Django and Python versions.
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,6 @@ | ||
[run] | ||
source = menu | ||
branch = 1 | ||
|
||
[report] | ||
omit = *migrations*,.tox/*,setup.py,*settings.py |
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,40 @@ | ||
name: Release | ||
|
||
on: | ||
push: | ||
tags: | ||
- '*' | ||
|
||
jobs: | ||
build: | ||
if: github.repository == 'jazzband/django-simple-menu' | ||
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: 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-simple-menu/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,51 @@ | ||
name: Test | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
name: build (Python ${{ matrix.python-version }}, Django ${{ matrix.django-version }}) | ||
runs-on: ubuntu-latest | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
python-version: ['3.6', '3.7', '3.8', '3.9'] | ||
django-version: ['2.2', '3.0', '3.1', 'main'] | ||
|
||
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') }}-${{ hashFiles('**/tox.ini') }} | ||
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 | ||
env: | ||
DJANGO: ${{ matrix.django-version }} | ||
|
||
- name: Upload coverage | ||
uses: codecov/codecov-action@v1 | ||
with: | ||
name: Python ${{ matrix.python-version }} |
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 |
---|---|---|
|
@@ -9,3 +9,7 @@ docs/_build/ | |
|
||
# example db | ||
example/example.sqlite3 | ||
|
||
coverage.xml | ||
.coverage | ||
.tox |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,4 +1,4 @@ | ||
django-simple-menu was initially developed by Evan Borgstom. | ||
|
||
See https://github.com/borgstrom/django-simple-menu/graphs/contributors for the full list of | ||
See https://github.com/jazzband/django-simple-menu/graphs/contributors for the full list of | ||
contributors to the code base. |
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
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 |
---|---|---|
@@ -1,4 +1,10 @@ | ||
from .menu import Menu, MenuItem | ||
from pkg_resources import get_distribution, DistributionNotFound | ||
from .menu import Menu, MenuItem # noqa | ||
|
||
__version__ = '1.2.1' | ||
__url__ = 'https://github.com/borgstrom/django-simple-menu' | ||
try: | ||
__version__ = get_distribution("django-simple-menu").version | ||
except DistributionNotFound: | ||
# package is not installed | ||
__version__ = None | ||
|
||
__url__ = 'https://github.com/jazzband/django-simple-menu' |
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,24 +1,35 @@ | ||
import os | ||
|
||
TEST_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), 'tests') | ||
TEST_DIR = os.path.join(os.path.abspath(os.path.dirname(__file__)), "tests") | ||
|
||
DATABASES = { | ||
'default': { | ||
'ENGINE': 'django.db.backends.sqlite3', | ||
'NAME': ':memory:', | ||
"default": { | ||
"ENGINE": "django.db.backends.sqlite3", | ||
"NAME": ":memory:", | ||
} | ||
} | ||
|
||
INSTALLED_APPS = [ | ||
'menu' | ||
] | ||
|
||
STATIC_URL = '/static/' | ||
STATIC_ROOT = os.path.join(TEST_DIR, 'static') | ||
INSTALLED_APPS = ["menu"] | ||
|
||
TEMPLATE_DIRS = ( | ||
os.path.join(TEST_DIR, 'test_templates'), | ||
) | ||
STATIC_URL = "/static/" | ||
STATIC_ROOT = os.path.join(TEST_DIR, "static") | ||
|
||
SECRET_KEY = "testing-menus-is-so-much-fun" | ||
|
||
TEMPLATES = [ | ||
{ | ||
"BACKEND": "django.template.backends.django.DjangoTemplates", | ||
"DIRS": [ | ||
os.path.join(TEST_DIR, "test_templates"), | ||
], | ||
"APP_DIRS": True, | ||
"OPTIONS": { | ||
"context_processors": [ | ||
"django.template.context_processors.debug", | ||
"django.template.context_processors.request", | ||
"django.contrib.auth.context_processors.auth", | ||
"django.contrib.messages.context_processors.messages", | ||
], | ||
}, | ||
}, | ||
] |
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
Oops, something went wrong.
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.
Obviously this is quite the step, but the old Python and Django versions aren't really supported anymore and we should use the oppurtunity to make the jump.