Skip to content

ci

ci #864

Workflow file for this run

name: Tests
on:
push:
paths-ignore:
- '**.md'
- '**.rst'
jobs:
build:
runs-on: ubuntu-latest
strategy:
max-parallel: 4
matrix:
python: ["3.8", "3.9", "3.10", "3.11"]
plone: ["52", "60"]
tz: ["UTC", "Europe/Rome"]
exclude:
- python: "3.8"
plone: "60"
- python: "3.9"
plone: "52"
- python: "3.10"
plone: "52"
- python: "3.11"
plone: "52"
steps:
- uses: actions/checkout@v4
- name: Cache eggs
uses: actions/cache@v4
with:
path: eggs
key: ${{ runner.OS }}-build-python${{ matrix.python }}-${{ matrix.plone }}
- name: Set up Python ${{ matrix.python }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python }}
- name: Install dependencies
run: |
pip install -r requirements.txt -c constraints_plone${{ matrix.plone }}.txt
cp test_plone${{ matrix.plone }}.cfg buildout.cfg
- name: Install buildout
run: |
buildout -N code-analysis:return-status-codes=True
- name: Code analysis
run: |
bin/code-analysis
- name: Run tests
run: |
bin/test-coverage
env:
PROXY_BEARER_AUTH: on
TZ: ${{ matrix.tz }}
- name: Upload coverage data to coveralls.io
run: |
pip install coveralls
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_FLAG_NAME: py${{ matrix.python }}-plone${{ matrix.plone }}-tz${{ matrix.tz }}
COVERALLS_PARALLEL: true
- name: Tests measurement
uses: green-coding-solutions/eco-ci-energy-estimation@v4 # use hash or @vX here (See note below)
with:
task: get-measurement
label: 'pytest'
# continue-on-error: true # recommended setting for production. See notes below.
- name: Show Energy Results
uses: green-coding-solutions/eco-ci-energy-estimation@v4 # use hash or @vX here (See note below)
with:
task: display-results
# continue-on-error: true # recommended setting for production. See notes below.
coveralls_finish:
needs: build
runs-on: ubuntu-latest
steps:
- name: Finished
run: |
pip install --upgrade coveralls
coveralls --service=github --finish
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}