fix: 🐛 ensure proper encoding of count_query params #7
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
name: CI | |
on: | |
push: | |
branches-ignore: | |
- "releases/**" | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
plone-version: | |
- '5.0' | |
- '5.1' | |
- '5.2' | |
python-version: ['2.7', '3.6', '3.7', '3.8'] | |
layer: | |
- Portlet_AjaxDisabled | |
- Portlet_AjaxEnabled | |
- Tile | |
- unit | |
coverage: ['no_coverage', 'coverage'] | |
exclude: | |
- plone-version: 5.0 | |
layer: Tile # standardtiles 2.3.2 does support using the request to query. embed might still be possible | |
- plone-version: 5.0 | |
layer: Portlet_AjaxEnabled # passes but meaningless as it skips all the tests | |
# Only 5.2+ runs on py3 | |
- plone-version: 5.0 | |
python-version: 3.6 | |
- plone-version: 5.0 | |
python-version: 3.7 | |
- plone-version: 5.0 | |
python-version: 3.8 | |
- plone-version: 5.1 | |
python-version: 3.6 | |
- plone-version: 5.1 | |
python-version: 3.7 | |
- plone-version: 5.1 | |
python-version: 3.8 | |
# Save some time by not running all the robot tests | |
- python-version: 3.6 | |
layer: Portlet_AjaxDisabled | |
- python-version: 3.7 | |
layer: Portlet_AjaxDisabled | |
- python-version: 3.6 | |
layer: Tile | |
- python-version: 3.7 | |
layer: Tile | |
# save some time only running coverage on the 5.2 tests | |
- plone-version: 5.0 | |
coverage: coverage | |
- plone-version: 5.1 | |
coverage: coverage | |
- plone-version: 5.2 | |
coverage: no_coverage | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt-get update -y | |
# sudo apt-get install -y build-essentials | |
sudo apt-get install -y libxml2-dev libxslt-dev python-dev | |
# sudo apt-get install py-pip | |
pip install \ | |
virtualenv wheel | |
- uses: nanasess/setup-chromedriver@master | |
# with: | |
# # Optional: do not specify to match Chrome's version | |
# chromedriver-version: '77.0.3865.40' | |
- name: Cache multiple paths | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/buildout-cache | |
~/extends | |
~/.cache/pip | |
key: ${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/*.cfg') }} | |
restore-keys: | | |
${{ runner.os }}-${{ matrix.python-version }}-${{ matrix.plone-version }}- | |
${{ runner.os }}-${{ matrix.python-version }}- | |
${{ runner.os }}- | |
- name: setup buildout cache | |
run: | | |
mkdir -p ~/buildout-cache/{eggs,downloads} | |
mkdir ~/.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 | |
- name: bootstrap buildout | |
run: | | |
./bootstrap.sh test-${{ matrix.plone-version }}.x.cfg | |
ls -al | |
- name: buildout | |
run: | | |
bin/buildout -t 10 -Nc test-${{ matrix.plone-version }}.x.cfg | |
bin/pip install zest.pocompile | |
bin/pocompile src | |
- name: test robot | |
if: ${{ matrix.coverage != 'coverage' && matrix.layer != 'unit' }} | |
run: | | |
export DISPLAY=:99.0 | |
chromedriver --url-base=/wd/hub & | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional | |
sleep 3 | |
bin/test --all --layer ${{ matrix.layer }} --list-tests | |
bin/test --all --layer ${{ matrix.layer }} | |
- name: test unit | |
if: ${{ matrix.coverage != 'coverage' && matrix.layer == 'unit' }} | |
run: | | |
bin/test --unit --list-tests | |
bin/test --unit | |
- name: createcoverage | |
if: ${{ matrix.coverage == 'coverage' && matrix.layer != 'unit' }} | |
run: | | |
export DISPLAY=:99.0 | |
chromedriver --url-base=/wd/hub & | |
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 & # optional | |
sleep 3 | |
bin/test --all --layer ${{ matrix.layer }} --list-tests | |
bin/createcoverage -t '--all --layer ${{ matrix.layer }}' | |
bin/coverage json -i | |
- name: createcoverage | |
if: ${{ matrix.coverage == 'coverage' && matrix.layer == 'unit' }} | |
run: | | |
bin/test --unit --list-tests | |
bin/createcoverage -t '--unit' | |
bin/coverage json -i | |
- name: Coveralls | |
if: ${{ matrix.coverage == 'coverage' }} | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel: true | |
flag-name: ${{ matrix.plone-version }}-${{ matrix.python-version }}-${{ matrix.layer }} | |
- name: code-analysis | |
if: always() | |
run: echo "${{ matrix.plone-version }}" | grep 5.1 || bin/code-analysis | |
- name: black | |
if: ${{ matrix.python-version == '3.8' }} | |
run: | | |
pip install black | |
black --check src | |
- name: Artifact Robot Test Report | |
if: failure() | |
uses: actions/upload-artifact@v1 | |
with: | |
name: test_results-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ matrix.layer }} | |
path: ./parts/test | |
- uses: actions/setup-python@v2 | |
if: failure() | |
with: | |
python-version: 2.7 | |
- name: Robottest report | |
continue-on-error: true | |
if: failure() | |
run: | | |
pip2.7 install popt || pip2.7 install --user popt | |
grep --include=output.xml -Rl FAIL parts/test | xargs --no-run-if-empty -n 1 popt | |
coveralls_finish: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: Coveralls Finished | |
uses: AndreMiras/coveralls-python-action@develop | |
with: | |
parallel-finished: true | |