Commit 7670236c authored by Kirill Smelkov's avatar Kirill Smelkov Committed by GitHub

Merge pull request #17 from navytux/y/ci

Fix CI

- Fix tests for ZODB5.6
- Switch from Travis to GitHub actions

See individual commits for details.

/reviewed-by @dataflake 
/reviewed-on https://github.com/zopefoundation/tempstorage/pull/17
parents db55c556 032c4ed3
# based on https://github.com/zopefoundation/meta/blob/master/config/default/tests.yml.j2
name: tests
on:
push:
pull_request:
schedule:
- cron: '0 12 * * 0' # run once a week on Sunday
# Allow to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
build:
strategy:
# We want to see all failures:
fail-fast: false
matrix:
os:
- ubuntu
config:
# [Python version, tox env]
- ["2.7", "py27"]
- ["3.5", "py35"]
- ["3.6", "py36"]
- ["3.7", "py37"]
- ["3.8", "py38"]
- ["3.9", "py39"]
- ["pypy2", "pypy"]
- ["pypy3", "pypy3"]
runs-on: ${{ matrix.os }}-latest
name: ${{ matrix.config[1] }}
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.config[0] }}
- name: Pip cache
uses: actions/cache@v2
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ matrix.config[0] }}-${{ hashFiles('setup.*', 'tox.ini') }}
restore-keys: |
${{ runner.os }}-pip-${{ matrix.config[0] }}-
${{ runner.os }}-pip-
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install tox
- name: Test
run: tox -e ${{ matrix.config[1] }}
language: python
python:
- "2.7"
- "3.5"
- "3.6"
- "pypy"
- "pypy3.5"
matrix:
include:
- python: "3.7"
dist: xenial
install:
- pip install -U setuptools
- pip install zc.buildout
- buildout bootstrap
- buildout
script:
- bin/test -v1
notifications:
email: false
cache:
pip: true
directories:
- eggs/
......@@ -107,7 +107,7 @@ class TemporaryStorageTests(unittest.TestCase):
Returns the object's new revision id.
"""
import transaction
from ZODB.Connection import TransactionMetaData
from ZODB.tests.MinPO import MinPO
if oid is None:
......@@ -121,7 +121,7 @@ class TemporaryStorageTests(unittest.TestCase):
if not already_pickled:
data = StorageTestBase.zodb_pickle(data)
# Begin the transaction
t = transaction.Transaction()
t = TransactionMetaData()
if user is not None:
t.user = user
if description is not None:
......
[tox]
envlist =
py27,py35,py36,py37,pypy,pypy3
py27,py35,py36,py37,py38,py39,pypy,pypy3
[testenv]
commands =
......
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment