diff --git a/.github/workflows/default.yml b/.github/workflows/default.yml index ff57417..ae6fdda 100644 --- a/.github/workflows/default.yml +++ b/.github/workflows/default.yml @@ -1,16 +1,19 @@ -name: Lint +name: Tests -on: [push, pull_request] +on: + pull_request: + push: + branches: + - "support/**" jobs: flake8: - name: flake8 - runs-on: ubuntu-lts + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.9 - name: Install flake8 @@ -22,12 +25,12 @@ jobs: run: flake8 isort: - runs-on: ubuntu-lts + runs-on: ubuntu-latest steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v6 - name: Set up Python - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: 3.9 - run: python -m pip install isort @@ -38,27 +41,25 @@ jobs: run: isort -c -rc -df aldryn_django unit-tests: - runs-on: ubuntu-lts + runs-on: ubuntu-latest strategy: fail-fast: false matrix: - python-version: ["3.8", "3.9", "3.10"] + python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"] steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v6 + - name: Update depenedencies + run: sudo apt-get update - name: Install dependencies run: sudo apt-get install -y libxml2-dev libxslt-dev python-dev-is-python3 - name: Set up Python ${{ matrix.python-version }} - uses: actions/setup-python@v2 + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} - - name: Install dependencies + - name: Run tests run: | python -m pip install --upgrade pip - pip install packaging - pip install --upgrade urllib3 - pip install -r tests/requirements.txt + python -m pip install -U packaging setuptools + python -m pip install -r tests/requirements.txt python setup.py install - - name: Run coverage - run: coverage run setup.py test - - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v1 + python tests/settings.py diff --git a/setup.py b/setup.py index 299aa7b..989494d 100644 --- a/setup.py +++ b/setup.py @@ -66,7 +66,6 @@ zip_safe=False, install_requires=REQUIREMENTS, classifiers=CLASSIFIERS, - test_suite="tests.settings.run", entry_points=""" [console_scripts] aldryn-django=aldryn_django.cli:main diff --git a/tests/requirements.txt b/tests/requirements.txt index 43110ee..24139fd 100644 --- a/tests/requirements.txt +++ b/tests/requirements.txt @@ -1,12 +1,8 @@ -# other requirements -# django-app-helper is not yet ready for Django 4 -https://github.com/FinalAngel/django-app-helper/archive/refs/heads/develop.zip#egg=django-app-helper -coverage +django-app-helper isort flake8 -# needed for the build to work -uwsgi -# currently breaks ci because it wants rust now -cryptography<3.4 +cffi<2.0.0 +dj-database-url<2.3.0 urllib3<1.27 -Pillow +psycopg2<2.9.11 +Pillow<11.0.0