Skip to content

Update CI pipline #288

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

Merged
merged 2 commits into from
May 21, 2022
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 12 additions & 15 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,16 +46,14 @@ jobs:
- run: python -m pip install -r lint-requirements.txt
- run: ${{ matrix.lint-command }}


dist:
runs-on: ubuntu-latest
steps:
- name: Install gettext
run: sudo apt install gettext -y
- uses: actions/setup-python@v3
- run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer
- uses: actions/checkout@v3
- run: python setup.py sdist bdist_wheel
- uses: actions/setup-python@v3
- run: sudo apt install gettext -y
- run: python -m pip install --upgrade pip build wheel twine readme-renderer
- run: python -m build --sdist --wheel
- run: python -m twine check dist/*
- uses: actions/upload-artifact@v2
with:
Expand All @@ -73,22 +71,21 @@ jobs:
- "3.9"
- "3.10"
django-version:
- "3.2a"
- "4.0a"
- "3.2"
- "4.0"
extra:
- ""
- "progressbar"
- "test"
- "test,progressbar"
steps:
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- run: sudo apt install gettext -y
- uses: actions/checkout@v3
- run: python -m pip install --upgrade pip setuptools codecov wheel
- run: python -m pip install .[${{ matrix.extra }}]
- run: python -m pip install --upgrade pip codecov
- run: python -m pip install -e .[${{ matrix.extra }}]
if: ${{ matrix.extra }}
- run: python -m pip install django~=${{ matrix.django-version }}
- name: Test with pytest
run: python setup.py test
- run: python -m pip install django~=${{ matrix.django-version }}a
- run: python -m pytest
- run: codecov
10 changes: 6 additions & 4 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
@@ -1,10 +1,12 @@
name: PyPi Release
name: Release

on: [release]
on:
release:
types: [published]

jobs:
build:

PyPi:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
Expand All @@ -14,5 +16,5 @@ jobs:
- run: python -m build --sdist --wheel
- run: python -m twine upload dist/*
env:
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
TWINE_USERNAME: __token__
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}
16 changes: 7 additions & 9 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,6 @@ install_requires =

setup_requires =
setuptools_scm
pytest-runner
tests_require =
pytest
pytest-cov
pytest-django

[options.package_data]
* = *.txt, *.rst, *.html, *.po
Expand All @@ -52,20 +47,23 @@ exclude =
tests

[options.extras_require]
test =
pytest
pytest-cov
pytest-django
progressbar = progressbar2>=3.0.0

[bdist_wheel]
universal = 1

[aliases]
test = pytest

[tool:pytest]
testpaths =
tests
norecursedirs=venv env .eggs
DJANGO_SETTINGS_MODULE=tests.settings
addopts = --cov=stdimage --nomigrations --tb=short
filterwarnings =
error
ignore:DeprecationWarning

[coverage:run]
source = .
Expand Down