-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Improve by using tox
- Loading branch information
Showing
7 changed files
with
82 additions
and
113 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,48 +1,60 @@ | ||
on: [push, pull_request] | ||
name: Tests | ||
jobs: | ||
instance: | ||
# instance: | ||
# strategy: | ||
# fail-fast: false | ||
# matrix: | ||
# include: | ||
# - python-version: "2.7" | ||
# plone-version: "5.2" | ||
# os: "ubuntu-20.04" | ||
# - python-version: "3.8" | ||
# plone-version: "5.2" | ||
# os: "ubuntu-latest" | ||
# - python-version: "3.9" | ||
# plone-version: "6.0" | ||
# os: "ubuntu-latest" | ||
# runs-on: ${{ matrix.os }} | ||
# name: ${{ matrix.plone-version }}-${{ matrix.python-version }} start instance | ||
# steps: | ||
# - uses: actions/[email protected] | ||
# - uses: collective/buildout.plonetest/.github/actions/buildout@gha-buildout-action | ||
# with: | ||
# github-token: ${{ secrets.GITHUB_TOKEN }} | ||
# python-version: ${{ matrix.python-version }} | ||
# plone-version: ${{ matrix.plone-version }} | ||
# buildout-parts: "copy_ckeditor_code ckeditor instance" | ||
# - name: Check that instance starts | ||
# run: | | ||
# bin/instance run startup.py | ||
all_tests_27: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: "2.7" | ||
plone-version: "5.2" | ||
os: "ubuntu-20.04" | ||
- python-version: "3.8" | ||
plone-version: "5.2" | ||
os: "ubuntu-latest" | ||
- python-version: "3.9" | ||
plone-version: "6.0" | ||
os: "ubuntu-latest" | ||
runs-on: ${{ matrix.os }} | ||
name: ${{ matrix.plone-version }}-${{ matrix.python-version }} start instance | ||
config: | ||
- ["plone52-py27", "plone/test-with-tox:5.2-2.7"] | ||
# needs: instance | ||
runs-on: ubuntu-20.04 | ||
container: | ||
image: ${{ matrix.config[1] }} | ||
name: ${{ matrix.config[0] }} | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: collective/buildout.plonetest/.github/actions/buildout@gha-buildout-action | ||
with: | ||
github-token: ${{ secrets.GITHUB_TOKEN }} | ||
python-version: ${{ matrix.python-version }} | ||
plone-version: ${{ matrix.plone-version }} | ||
buildout-parts: "copy_ckeditor_code ckeditor instance" | ||
- name: Check that instance starts | ||
run: | | ||
bin/instance run startup.py | ||
- uses: actions/checkout@v3 | ||
- name: Test | ||
run: tox -e ${{ matrix.config[0] }} | ||
all_tests: | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
include: | ||
- python-version: "2.7" | ||
plone-version: "5.2" | ||
os: "ubuntu-20.04" | ||
- python-version: "3.8" | ||
plone-version: "5.2" | ||
os: "ubuntu-latest" | ||
- python-version: "3.9" | ||
plone-version: "6.0" | ||
os: "ubuntu-latest" | ||
needs: instance | ||
# needs: instance | ||
name: ${{ matrix.plone-version }}-${{ matrix.python-version }} run tests (robot inc) | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
|
@@ -69,18 +81,18 @@ jobs: | |
run: | | ||
ROBOT_BROWSER=headlessFirefox bin/pytest -k "robot and not image2" | ||
ROBOT_BROWSER=headlessFirefox bin/pytest -k "robot and image2" | ||
test_upgrade: | ||
needs: all_tests | ||
name: 5.2-2.7 upgrade | ||
runs-on: ubuntu-20.04 | ||
steps: | ||
- uses: actions/[email protected] | ||
- uses: collective/buildout.plonetest/.github/actions/buildout@gha-buildout-action | ||
with: | ||
github-token: ${{ secrets.github-token }} | ||
python-version: "2.7" | ||
plone-version: "5.2" | ||
buildout-parts: "copy_ckeditor_code ckeditor pytest" | ||
- name: Run upgrade tests | ||
run: | | ||
bin/pytest -k "upgrade" | ||
# test_upgrade: | ||
# needs: all_tests | ||
# name: 5.2-2.7 upgrade | ||
# runs-on: ubuntu-20.04 | ||
# steps: | ||
# - uses: actions/[email protected] | ||
# - uses: collective/buildout.plonetest/.github/actions/buildout@gha-buildout-action | ||
# with: | ||
# github-token: ${{ secrets.github-token }} | ||
# python-version: "2.7" | ||
# plone-version: "5.2" | ||
# buildout-parts: "copy_ckeditor_code ckeditor pytest" | ||
# - name: Run upgrade tests | ||
# run: | | ||
# bin/pytest -k "upgrade" |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
# For Buildout related packages, it is easiest to keep them at the same version for all environments. | ||
# Keep these in sync with base.cfg please: | ||
zc.buildout==3.0.1 | ||
# setuptools 67 is too strict with versions | ||
setuptools<67 |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
[tox] | ||
minversion = 3.18 | ||
envlist = | ||
plone52-py{27,36,37,38} | ||
plone60-py{38,39,310,311} | ||
|
||
[testenv] | ||
# We do not install with pip, but with buildout: | ||
usedevelop = false | ||
skip_install = true | ||
deps = | ||
-r requirements-tox.txt | ||
commands_pre = | ||
plone52: {envbindir}/buildout -Nc {toxinidir}/test-5.2.x.cfg buildout:directory={envdir} buildout:develop={toxinidir} install copy_ckeditor_code ckeditor pytest | ||
plone60: {envbindir}/buildout -Nc {toxinidir}/test-6.0.x.cfg buildout:directory={envdir} buildout:develop={toxinidir} install copy_ckeditor_code ckeditor pytest | ||
commands = | ||
{envbindir}/pytest |