From 67f5a33240e5654f7dd67eea054a8aee1ed78200 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Jordi=20Puiggen=C3=A9?= Date: Wed, 12 Jun 2024 18:31:48 +0200 Subject: [PATCH] Added build-and-test action --- .github/workflows/build-and-test.yml | 30 +++++++++++++++++++++++++++ buildout.cfg | 31 +++++++++++++++++++--------- requirements.txt | 3 +++ 3 files changed, 54 insertions(+), 10 deletions(-) create mode 100644 .github/workflows/build-and-test.yml create mode 100644 requirements.txt diff --git a/.github/workflows/build-and-test.yml b/.github/workflows/build-and-test.yml new file mode 100644 index 0000000..3d3b282 --- /dev/null +++ b/.github/workflows/build-and-test.yml @@ -0,0 +1,30 @@ +name: build and test senaite.storage +on: + - push + - pull_request +env: + PLONE_VERSION: "5.2" +jobs: + build-and-test: + runs-on: 'ubuntu-20.04' + container: + image: python:2.7.18-buster + steps: + - uses: actions/checkout@v3 + - name: cache eggs + uses: actions/cache@v3 + with: + key: eggs-cache-${{ hashFiles('buildout.cfg', 'requirements.txt') }} + path: | + eggs/ + - name: install + run: | + pip install virtualenv + virtualenv -p `which python` . + bin/pip install --upgrade pip + bin/pip install -r requirements.txt + bin/buildout -N -t 3 annotate + bin/buildout -N -t 3 + - name: test + run: | + bin/test -s senaite.storage.tests diff --git a/buildout.cfg b/buildout.cfg index b66f267..da1d6c3 100644 --- a/buildout.cfg +++ b/buildout.cfg @@ -7,18 +7,24 @@ find-links = parts = instance + test + omelette i18ndude update_translations write_code_headers - test - omelette eggs = - senaite.lims + senaite.storage senaite.core + senaite.app.listing + senaite.app.spotlight + senaite.app.supermodel + senaite.impress + senaite.jsonapi + senaite.lims + plone.reload - i18ndude - lxml + Products.PrintingMailHost zcml = @@ -41,14 +47,18 @@ senaite.lims = git https://github.com/senaite/senaite.lims.git pushurl=git@githu [instance] recipe = plone.recipe.zope2instance -user = admin:admin http-address = 127.0.0.1:8080 +user = ${buildout:plone-user} +wsgi = off eggs = + Plone + plone.app.upgrade + ${buildout:package-name} ${buildout:eggs} -zcml = - ${buildout:zcml} +deprecation-warnings = on environment-vars = zope_i18n_compile_mo_files true +zcml = [i18ndude] unzip = true @@ -78,5 +88,6 @@ recipe = collective.recipe.omelette eggs = ${buildout:eggs} [versions] -setuptools = 42.0.2 -zc.buildout = 2.13.3 +# versions taken from requirements.txt +setuptools = +zc.buildout = diff --git a/requirements.txt b/requirements.txt new file mode 100644 index 0000000..1e1b3ab --- /dev/null +++ b/requirements.txt @@ -0,0 +1,3 @@ +setuptools==44.1.1 +zc.buildout==2.13.3 +wheel