Skip to content

Commit

Permalink
testing setup
Browse files Browse the repository at this point in the history
  • Loading branch information
erral committed Jan 5, 2024
1 parent c40bc58 commit 804c2b9
Showing 1 changed file with 55 additions and 56 deletions.
111 changes: 55 additions & 56 deletions .github/workflows/plone-package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,62 +4,61 @@
name: Plone package

on:
push:
branches: [main]
pull_request:
branches: [main]
push:
branches: [main]
pull_request:
branches: [main]

jobs:
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plone-version:
- 'Plone52'
- 'Plone60'
python-version: [3.7, 3.8, 3.9]
build:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
plone-version:
- "Plone60"
python-version: [3.7, 3.8, 3.9]

steps:
- uses: actions/setup-python@v2
with:
python-version: '3.9'
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/buildout-cache
~/extends
key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/*.cfg') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/tox.ini') }}
#restore-keys: |
# ${{ runner.os }}-tox-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- 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: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Black-Check
run: |
tox -r -e black-check
- name: Test with tox
run: |
tox -r
env:
PLONE-VERSION: ${{ matrix.plone-version }}
PYTHON-VERSION: ${{ matrix.python-version }}
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true
if: matrix.python-version == '3.7'
steps:
- uses: actions/setup-python@v2
with:
python-version: "3.9"
- uses: actions/checkout@v2
- uses: actions/cache@v2
with:
path: |
~/.cache/pip
~/buildout-cache
~/extends
key: ${{ runner.os }}-tox-${{ matrix.python-version }}-${{ matrix.plone-version }}-${{ hashFiles('**/setup.py') }}-${{ hashFiles('**/requirements.txt') }}-${{ hashFiles('**/*.cfg') }}-${{ hashFiles('**/constraints.txt') }}-${{ hashFiles('**/tox.ini') }}
#restore-keys: |
# ${{ runner.os }}-tox-
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- 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: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox tox-gh-actions
- name: Black-Check
run: |
tox -r -e black-check
- name: Test with tox
run: |
tox -r
env:
PLONE-VERSION: ${{ matrix.plone-version }}
PYTHON-VERSION: ${{ matrix.python-version }}
- name: "Upload coverage to Codecov"
uses: "codecov/codecov-action@v1"
with:
fail_ci_if_error: true
if: matrix.python-version == '3.7'

0 comments on commit 804c2b9

Please sign in to comment.