Back to development: 1.0a2 #57
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
# This workflow will install Python dependencies, run tests and lint with a variety of Python versions | |
# For more information see: https://help.github.com/actions/language-and-framework-guides/using-python-with-github-actions | |
name: Push tests | |
# run-name: ${{ github.actor }} push tests | |
on: | |
push: | |
pull_request: | |
env: | |
coverage-python: "3.10" | |
coverage-plone: "6.0" | |
jobs: | |
test: | |
runs-on: ubuntu-22.04 | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- python: 2.7 | |
plone: 4.3 | |
- python: 3.7 | |
plone: 5.2 | |
- python: "3.10" | |
plone: "6.0" | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ matrix.python }} | |
- name: Setup Env | |
run: | | |
pip install -r requirements-${{ matrix.plone }}.txt | |
- name: Cache eggs | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-eggs | |
with: | |
path: ~/buildout-cache/eggs | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }} | |
restore-keys: ${{ runner.os }}-test-${{ env.cache-name }}-${{ matrix.plone }} | |
- name: buildout | |
run: | | |
sed -ie "s#test.cfg#test-${{matrix.plone}}.cfg#" gha.cfg | |
buildout -c gha.cfg annotate | |
buildout -c gha.cfg | |
- name: test | |
run: | | |
bin/test -t !robot | |
coverage: | |
runs-on: ubuntu-22.04 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Python | |
uses: actions/setup-python@v4 | |
with: | |
python-version: ${{ env.coverage-python }} | |
- name: Setup Env | |
run: | | |
pip install -r requirements-${{env.coverage-plone}}.txt | |
pip install -U coveralls coverage | |
- name: Cache eggs | |
uses: actions/cache@v2 | |
env: | |
cache-name: cache-eggs | |
with: | |
path: ~/buildout-cache/eggs | |
key: ${{ runner.os }}-test-${{ env.cache-name }}-${{ env.coverage-plone }} | |
restore-keys: ${{ runner.os }}-test-${{ env.cache-name }}-${{ env.coverage-plone }} | |
- name: buildout | |
run: | | |
sed -ie "s#test.cfg#test-${{env.coverage-plone}}.cfg#" gha.cfg | |
buildout -c gha.cfg | |
- name: code-analysis | |
run: | | |
bin/code-analysis | |
- name: test coverage | |
run: | | |
coverage run bin/test -t !robot | |
- name: Publish to Coveralls | |
env: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
run: | | |
coveralls --service=github |