Skip to content

Fix GHA

Fix GHA #54

Workflow file for this run

# Inspired by:
# https://github.com/zopefoundation/meta/tree/master/config/pure-python
name: tests
on:
push:
branches: [master]
pull_request:
schedule:
- cron: "0 12 * * 0" # run once a week on Sunday
jobs:
tests:
runs-on: ubuntu-latest
strategy:
matrix:
config:
- ["Py3.8-Plone5.2", "3.8", "5.2"]
steps:
- uses: actions/checkout@v5
- name: Set up Python ${{ matrix.config[1] }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.config[1] }}
- name: Pip cache
uses: actions/cache@v4
with:
path: |
~/.cache/pip
**/eggs
**/downloads
key: ${{ runner.os }}-cache-${{ hashFiles('setup.*', '*.cfg') }}-${{ matrix.config[0] }}
restore-keys: |
${{ runner.os }}-cache-
- name: Install dependencies
run: |
sudo apt-get install libxml2-dev libxslt-dev xvfb
mkdir -p $HOME/buildout-cache/{eggs,downloads}
mkdir $HOME/.buildout
echo "[buildout]" > $HOME/.buildout/default.cfg
echo "download-cache = $HOME/buildout-cache/downloads" >> $HOME/.buildout/default.cfg
echo "eggs-directory = $HOME/buildout-cache/eggs" >> $HOME/.buildout/default.cfg
echo "abi-tag-eggs = true" >> $HOME/.buildout/default.cfg
wget https://github.com/mozilla/geckodriver/releases/download/v0.36.0/geckodriver-v0.36.0-linux64.tar.gz
mkdir geckodriver && tar zxvf geckodriver-v0.36.0-linux64.tar.gz -C geckodriver
- name: Install requirements and buildout
run: |
which pip
`which pip` install -r requirements.txt
`which pip` freeze
- name: Run buildout
run: |
sed -ie "s#plone-x.x.x.cfg#plone-${{ matrix.config[2] }}.x.cfg#" .gha.cfg
buildout -c .gha.cfg
- name: Test
run: PATH=$PATH:$PWD/geckodriver ROBOT_HTTP_PORT=55001 xvfb-run --server-args="-screen 0 1600x1200x24" ./bin/test