From f40705b739d57f89a17dd648e13929330f3ae027 Mon Sep 17 00:00:00 2001 From: Johannes Wilm Date: Tue, 9 Aug 2022 20:54:25 +0200 Subject: [PATCH] github actions: add django 4.1, switch to Codecov --- .github/workflows/lint.yml | 2 +- .github/workflows/test.yml | 56 ++++++++++++++++++++------------------ setup.py | 6 ++-- 3 files changed, 33 insertions(+), 31 deletions(-) diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml index 22adb16..9db7465 100644 --- a/.github/workflows/lint.yml +++ b/.github/workflows/lint.yml @@ -11,7 +11,7 @@ jobs: runs-on: ubuntu-latest steps: - name: 'Set up Python' - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: '3.10' - uses: actions/checkout@v2 diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml index f69afa2..97b5bb5 100644 --- a/.github/workflows/test.yml +++ b/.github/workflows/test.yml @@ -1,11 +1,5 @@ name: Test -on: - push: - branches: - - main - pull_request: - branches: - - main +on: [push, pull_request] jobs: Build: runs-on: ubuntu-latest @@ -13,34 +7,42 @@ jobs: matrix: include: - python-version: 3.6 - DJANGO: 3.2.14 + django-version: 3.2 - python-version: 3.7 - DJANGO: 3.2.14 + django-version: 3.2 - python-version: 3.8 - DJANGO: 3.2.14 + django-version: 3.2 - python-version: 3.9 - DJANGO: 3.2.14 + django-version: 3.2 - python-version: '3.10' - DJANGO: 3.2.14 + django-version: 3.2 - python-version: 3.8 - DJANGO: 4.0.6 + django-version: 4.0 - python-version: 3.9 - DJANGO: 4.0.6 + django-version: 4.0 - python-version: '3.10' - DJANGO: 4.0.6 + django-version: 4.0 + - python-version: 3.8 + django-version: 4.1 + - python-version: 3.9 + django-version: 4.1 + - python-version: '3.10' + django-version: 4.1 steps: + - uses: actions/checkout@v3 - name: 'Set up Python ${{ matrix.python-version }}' - uses: actions/setup-python@v2 + uses: actions/setup-python@v3 with: python-version: '${{ matrix.python-version }}' - - uses: actions/checkout@v2 - - run: pip install coveralls - - run: pip install -e . - - run: pip install -r tests/requirements.txt - - run: 'pip install Django==${DJANGO}' - env: - DJANGO: '${{ matrix.DJANGO }}' - - run: make test - - run: coveralls --service=github - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + cache: 'pip' + - name: Install dependencies + run: | + pip install -e . + pip install -r tests/requirements.txt + pip install "Django~=${{ matrix.django-version }}.0" . + - name: Run Tests + run: | + echo "$(python --version) / Django $(django-admin --version)" + make test + coverage xml + - uses: codecov/codecov-action@v2 diff --git a/setup.py b/setup.py index 28fb6a2..0dcdc47 100644 --- a/setup.py +++ b/setup.py @@ -43,9 +43,9 @@ setup( keywords="avatar, django", author="Eric Florenzano", author_email="floguy@gmail.com", - maintainer="Grant McConnaughey", - maintainer_email="grantmcconnaughey@gmail.com", - url="http://github.com/grantmcconnaughey/django-avatar/", + maintainer="Johannes Wilm", + maintainer_email="johannes@fiduswriter.org", + url="http://github.com/johanneswilm/django-avatar/", license="BSD", packages=find_packages(exclude=["tests"]), package_data={