Skip to content

Update plonetest-matrix.yml #1

Update plonetest-matrix.yml

Update plonetest-matrix.yml #1

# This workflow will install Python dependencies, run tests and lint with a variety of Python versions
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions
name: Plone Python Matrix for Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
jobs:
test:
name: Tests report
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
plone-version: ["6.0-latest", "6.1-latest"]
python-version: ["3.9", "3.10", "3.11", "3.12"]
os: ["ubuntu-latest"]
steps:
- name: Checkout Project
uses: actions/checkout@v4
- name: Set up Cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/*.cfg') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/tox.ini') }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- name: Install system libraries
run: sudo apt install libxml2-dev libxslt1-dev libjpeg-dev
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions mxdev
- name: Prepare Playwright Deps
run: sudo npx playwright install-deps
- name: prepeare constraints
run: |
echo "-c https://dist.plone.org/release/${{ matrix.plone-version }}/constraints.txt" >> constraints.txt
- name: Initialize tox
if: contains(matrix.os, 'ubuntu')
run: |
if [ `tox list --no-desc -f init|wc -l` = 1 ]; then tox -e init;else true; fi
- name: Test with tox
run: |
tox -e test