Skip to content
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

Feat: add django cms 4.1 support #57

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Prev Previous commit
Next Next commit
update action
  • Loading branch information
Josh Yu committed Aug 21, 2024
commit 62905baf58bf84f03b427f9c655f292ed531c1f0
65 changes: 23 additions & 42 deletions .github/workflows/pr.yml
Original file line number Diff line number Diff line change
@@ -1,55 +1,36 @@
name: Tox tests
name: django CMS references test.yml

on: [push, pull_request]
on: [pull_request, push]

jobs:
test:
if: ${{ !contains(github.event.head_commit.message, '[skip ci]') }}
database-sqlite:
runs-on: ubuntu-latest
continue-on-error: ${{ matrix.continue-on-error }}
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.9", "3.8"]
django: [42, 32]
cms: [40, 41]
continue-on-error: [true]
python-version: [ 3.8, 3.9, '3.10'] # latest release minus two
requirements-file: [
dj32_cms40.txt,
dj42_cms40.txt,
dj42_cms41.txt,
]

steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v1
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4

uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Cache pip
uses: actions/cache@v3
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ format('py{0}-django{1}-cms{2}', matrix.python-version, matrix.django, matrix.cms) }}
restore-keys: |
${{ runner.os }}-pip-${{ format('py{0}-django{1}-cms{2}', matrix.python-version, matrix.django, matrix.cms) }}
- name: Cache tox
uses: actions/cache@v3
with:
path: .tox
key: ${{ runner.os }}-tox-${{ format('{{py{0}-django{1}-cms{2}}}', matrix.python-version, matrix.django, matrix.cms) }}-${{ hashFiles('setup.cfg') }}
restore-keys: |
${{ runner.os }}-tox-${{ format('{{py{0}-django{1}-cms{2}}}', matrix.python-version, matrix.django, matrix.cms) }}-
- name: Install dependencies
run: |
sudo apt-get install gettext
python -m pip install --upgrade pip setuptools tox>4
- name: Test with tox
env:
TOX_ENV: ${{ format('py{0}-django{1}-cms{2}', matrix.python-version, matrix.django, matrix.cms) }}
COMMAND: coverage run
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_SERVICE_NAME: github
sudo apt install gettext gcc -y
python -m pip install --upgrade pip
pip install pytest
pip install -r tests/requirements/${{ matrix.requirements-file }}
python setup.py install
- name: Test with python test runner
run: |
tox -e$TOX_ENV
.tox/$TOX_ENV/bin/coverage xml
.tox/$TOX_ENV/bin/coveralls --service=github
- uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
flags: unittests
files: ./coverage.xml
fail_ci_if_error: false
python setup.py test
env:
DATABASE_URL: sqlite://localhost/testdb.sqlite
Loading