fix hotfix-link #156
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: starzel buildout | |
on: [push] | |
jobs: | |
build: | |
runs-on: ubuntu-20.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
python-version: [2.7, 3.7, 3.8, 3.9] | |
steps: | |
# git checkout | |
- uses: actions/checkout@v3 | |
# python setup | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python-version }} | |
# python cache | |
- uses: actions/cache@v1 | |
with: | |
path: | | |
~/.cache/pip | |
~/buildout-cache | |
~/eggs | |
~/downloads | |
key: ${{ runner.os }}-pip-${{ hashFiles('**/requirements.txt') }} | |
restore-keys: | | |
${{ runner.os }}-pip- | |
- name: Prepare mrbob answers | |
run: | | |
echo "[variables]" > $HOME/mrbob_answers.txt | |
echo "package.type = Basic" >> $HOME/mrbob_answers.txt | |
echo "package.namespace = project" >> $HOME/mrbob_answers.txt | |
echo "package.namespace2 =" >> $HOME/mrbob_answers.txt | |
echo "package.name = site" >> $HOME/mrbob_answers.txt | |
echo "package.description = A Dummy package" >> $HOME/mrbob_answers.txt | |
echo "package.git.disabled = True" >> $HOME/mrbob_answers.txt | |
echo "author.name = Philip Bauer" >> $HOME/mrbob_answers.txt | |
echo "author.email = bauer@starzel.de" >> $HOME/mrbob_answers.txt | |
echo "author.github.user = pbauer" >> $HOME/mrbob_answers.txt | |
echo "plone.version = 5.2" >> $HOME/mrbob_answers.txt | |
echo "python.version = 3.7" >> $HOME/mrbob_answers.txt | |
echo "vscode_support = False" >> $HOME/mrbob_answers.txt | |
- name: Install dependencies | |
run: | | |
pip install -r requirements.txt | |
pip install mr.bob==0.1.2 bobtemplates.plone==5.2.2 regex==2021.3.17 | |
- name: Prepare and annotate buildout | |
run: | | |
echo -e "[buildout]\nlogin = admin\npassword = admin" > secret.cfg | |
ln -s local_develop.cfg local.cfg | |
buildout -N buildout:download-cache=downloads code-analysis:return-status-codes=True annotate | |
- name: Run buildout | |
run: | | |
buildout -N buildout:download-cache=downloads code-analysis:return-status-codes=True | |
- name: Create addon and re-run buildout | |
run: | | |
mkdir src | |
pip install tox | |
mrbob -O src/project.site --config $HOME/mrbob_answers.txt bobtemplates.plone:addon | |
# add that package to buildout.cfg in eggs, testeggs, auto-checkout and [sources] | |
sed -i "16i \ project.site" buildout.cfg | |
sed -i "20i \ project.site [test]" buildout.cfg | |
sed -i "24i \ project.site" buildout.cfg | |
sed -i "30i project.site = fs project.site full-path=\${buildout\:directory}/src/project.site" buildout.cfg | |
# re-run buildout | |
buildout -N buildout:download-cache=downloads code-analysis:return-status-codes=True | |
- name: test | |
run: bin/coverage-test |