Skip to content

Commit 7db3961

Browse files
authored
Update CI pipline (#288)
1 parent f6d953b commit 7db3961

File tree

3 files changed

+25
-28
lines changed

3 files changed

+25
-28
lines changed

.github/workflows/ci.yml

Lines changed: 12 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -46,16 +46,14 @@ jobs:
4646
- run: python -m pip install -r lint-requirements.txt
4747
- run: ${{ matrix.lint-command }}
4848

49-
5049
dist:
5150
runs-on: ubuntu-latest
5251
steps:
53-
- name: Install gettext
54-
run: sudo apt install gettext -y
55-
- uses: actions/setup-python@v3
56-
- run: python -m pip install --upgrade pip setuptools wheel twine readme-renderer
5752
- uses: actions/checkout@v3
58-
- run: python setup.py sdist bdist_wheel
53+
- uses: actions/setup-python@v3
54+
- run: sudo apt install gettext -y
55+
- run: python -m pip install --upgrade pip build wheel twine readme-renderer
56+
- run: python -m build --sdist --wheel
5957
- run: python -m twine check dist/*
6058
- uses: actions/upload-artifact@v3
6159
with:
@@ -73,22 +71,21 @@ jobs:
7371
- "3.9"
7472
- "3.10"
7573
django-version:
76-
- "3.2a"
77-
- "4.0a"
74+
- "3.2"
75+
- "4.0"
7876
extra:
79-
- ""
80-
- "progressbar"
77+
- "test"
78+
- "test,progressbar"
8179
steps:
8280
- name: Set up Python ${{ matrix.python-version }}
8381
uses: actions/setup-python@v3
8482
with:
8583
python-version: ${{ matrix.python-version }}
8684
- run: sudo apt install gettext -y
8785
- uses: actions/checkout@v3
88-
- run: python -m pip install --upgrade pip setuptools codecov wheel
89-
- run: python -m pip install .[${{ matrix.extra }}]
86+
- run: python -m pip install --upgrade pip codecov
87+
- run: python -m pip install -e .[${{ matrix.extra }}]
9088
if: ${{ matrix.extra }}
91-
- run: python -m pip install django~=${{ matrix.django-version }}
92-
- name: Test with pytest
93-
run: python setup.py test
89+
- run: python -m pip install django~=${{ matrix.django-version }}a
90+
- run: python -m pytest
9491
- run: codecov

.github/workflows/release.yml

Lines changed: 6 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,12 @@
1-
name: PyPi Release
1+
name: Release
22

3-
on: [release]
3+
on:
4+
release:
5+
types: [published]
46

57
jobs:
6-
build:
78

9+
PyPi:
810
runs-on: ubuntu-latest
911
steps:
1012
- uses: actions/checkout@v3
@@ -14,5 +16,5 @@ jobs:
1416
- run: python -m build --sdist --wheel
1517
- run: python -m twine upload dist/*
1618
env:
17-
TWINE_USERNAME: ${{ secrets.TWINE_USERNAME }}
19+
TWINE_USERNAME: __token__
1820
TWINE_PASSWORD: ${{ secrets.TWINE_PASSWORD }}

setup.cfg

Lines changed: 7 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -38,11 +38,6 @@ install_requires =
3838

3939
setup_requires =
4040
setuptools_scm
41-
pytest-runner
42-
tests_require =
43-
pytest
44-
pytest-cov
45-
pytest-django
4641

4742
[options.package_data]
4843
* = *.txt, *.rst, *.html, *.po
@@ -52,20 +47,23 @@ exclude =
5247
tests
5348

5449
[options.extras_require]
50+
test =
51+
pytest
52+
pytest-cov
53+
pytest-django
5554
progressbar = progressbar2>=3.0.0
5655

5756
[bdist_wheel]
5857
universal = 1
5958

60-
[aliases]
61-
test = pytest
62-
6359
[tool:pytest]
60+
testpaths =
61+
tests
6462
norecursedirs=venv env .eggs
6563
DJANGO_SETTINGS_MODULE=tests.settings
6664
addopts = --cov=stdimage --nomigrations --tb=short
6765
filterwarnings =
68-
error
66+
ignore:DeprecationWarning
6967

7068
[coverage:run]
7169
source = .

0 commit comments

Comments
 (0)