Skip to content

Commit

Permalink
moving CI to github actions
Browse files Browse the repository at this point in the history
  • Loading branch information
agroszer committed Feb 20, 2023
1 parent 807b18d commit 05b91cb
Show file tree
Hide file tree
Showing 8 changed files with 279 additions and 32 deletions.
1 change: 1 addition & 0 deletions .coveragerc
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
[run]
include = */shoobx/mocks3/*
omit = */test*
relative_files = True
29 changes: 29 additions & 0 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: shoobx.mocks3

on:
- push
- pull_request

jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ['3.8', '3.9', '3.10', '3.11']

steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install tox tox-gh-actions
- name: Test with tox
run: tox
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
15 changes: 0 additions & 15 deletions .travis.yml

This file was deleted.

7 changes: 6 additions & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ all: ve ve/bin/test

.PHONY: test
test: ve/bin/test
ve/bin/test -vpc1 --all
ve/bin/test -vvc1 --all

.PHONY: coverage
coverage: ve
Expand All @@ -62,3 +62,8 @@ run: ve
.PHONY: run-uwsgi
run-uwsgi: ve
uwsgi ./config/uwsgi.ini --need-app

.PHONY: pip-compile
pip-compile: ve
ve/bin/pip install pip-tools
ve/bin/pip-compile ./requirements.in --upgrade
11 changes: 11 additions & 0 deletions requirements.in
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
-e file:.[test]

# moto[server] 4.1.2
# breaks with
# File "/work/shoobx/shoobx.mocks3/ve/lib/python3.10/site-packages/moto/s3/responses.py", line 1176, in _key_response
# bucket_permissions = bucket.get_permission(action, resource)
# AttributeError: 'Bucket' object has no attribute 'get_permission'
#
# https://github.com/getmoto/moto/pull/5883#issuecomment-1437083301

moto[server]==4.1.1
232 changes: 221 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,12 +1,222 @@
# shoobx.mocks3
-e . [test]
#
# This file is autogenerated by pip-compile with Python 3.10
# by the following command:
#
# pip-compile ./requirements.in
#
-e file:.
# via -r ./requirements.in
attrs==22.2.0
# via
# jschema-to-python
# jsonschema
# sarif-om
aws-sam-translator==1.59.0
# via cfn-lint
aws-xray-sdk==2.11.0
# via moto
boto3==1.26.74
# via
# aws-sam-translator
# moto
# shoobx-mocks3
botocore==1.29.74
# via
# aws-xray-sdk
# boto3
# moto
# s3transfer
certifi==2022.12.7
# via requests
cffi==1.15.1
# via cryptography
cfn-lint==0.73.2
# via moto
charset-normalizer==3.0.1
# via requests
click==8.1.3
# via flask
coverage==7.1.0
# via shoobx-mocks3
cryptography==39.0.1
# via
# moto
# python-jose
# sshpubkeys
docker==6.0.1
# via moto
ecdsa==0.18.0
# via
# moto
# python-jose
# sshpubkeys
extras==1.0.0
# via
# python-subunit
# testtools
fixtures==4.0.1
# via testtools
flask==2.2.3
# via
# flask-cors
# moto
flask-cors==3.0.10
# via
# moto
# shoobx-mocks3
freezegun==1.2.2
# via shoobx-mocks3
graphql-core==3.2.3
# via moto
idna==3.4
# via requests
itsdangerous==2.1.2
# via flask
jinja2==3.1.2
# via
# flask
# moto
jmespath==1.0.1
# via
# boto3
# botocore
jschema-to-python==1.2.3
# via cfn-lint
jsondiff==2.0.0
# via moto
jsonpatch==1.32
# via cfn-lint
jsonpickle==3.0.1
# via jschema-to-python
jsonpointer==2.3
# via jsonpatch
jsonschema==4.17.3
# via
# aws-sam-translator
# cfn-lint
# jsonschema-spec
# openapi-schema-validator
# openapi-spec-validator
jsonschema-spec==0.1.3
# via openapi-spec-validator
junit-xml==1.9
# via cfn-lint
junitxml==0.7
# via shoobx-mocks3
lazy-object-proxy==1.9.0
# via openapi-spec-validator
markupsafe==2.1.2
# via
# jinja2
# werkzeug
mock==5.0.1
# via shoobx-mocks3
moto[server]==4.1.1
# via shoobx-mocks3
networkx==3.0
# via cfn-lint
openapi-schema-validator==0.4.3
# via openapi-spec-validator
openapi-spec-validator==0.5.5
# via moto
packaging==23.0
# via docker
pathable==0.4.3
# via jsonschema-spec
pbr==5.11.1
# via
# fixtures
# jschema-to-python
# sarif-om
# testtools
pyasn1==0.4.8
# via
# python-jose
# rsa
pycparser==2.21
# via cffi
pydantic==1.10.5
# via aws-sam-translator
pyparsing==3.0.9
# via moto
pyrsistent==0.19.3
# via jsonschema
python-dateutil==2.8.2
# via
# botocore
# freezegun
# moto
python-jose[cryptography]==3.3.0
# via moto
python-subunit==1.4.2
# via shoobx-mocks3
pytz==2022.7.1
# via shoobx-mocks3
pyyaml==6.0
# via
# cfn-lint
# jsonschema-spec
# moto
requests==2.28.2
# via
# docker
# moto
# responses
responses==0.22.0
# via moto
rfc3339-validator==0.1.4
# via openapi-schema-validator
rsa==4.9
# via python-jose
s3transfer==0.6.0
# via boto3
sarif-om==1.0.4
# via cfn-lint
six==1.16.0
# via
# ecdsa
# flask-cors
# junit-xml
# python-dateutil
# rfc3339-validator
# zope-testrunner
sshpubkeys==3.3.1
# via moto
testtools==2.5.0
# via python-subunit
toml==0.10.2
# via responses
types-toml==0.10.8.4
# via responses
typing-extensions==4.4.0
# via
# aws-sam-translator
# jsonschema-spec
# pydantic
urllib3==1.26.14
# via
# botocore
# docker
# requests
# responses
websocket-client==1.5.1
# via docker
werkzeug==2.2.3
# via
# flask
# moto
wrapt==1.14.1
# via aws-xray-sdk
xmltodict==0.13.0
# via moto
zope-exceptions==4.6
# via zope-testrunner
zope-interface==5.5.2
# via
# zope-exceptions
# zope-testrunner
zope-testrunner==5.6
# via shoobx-mocks3

coverage == 5.5
freezegun == 1.0.0
junit-xml == 1.9
mock == 4.0.3
moto == 4.0.11
python-subunit == 1.4.0
Werkzeug == 2.1.2
tox == 3.24.5
zope.testrunner == 5.3.0
# The following packages are considered to be unsafe in a requirements file:
# setuptools
5 changes: 2 additions & 3 deletions setup.py
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@
###############################################################################
"""Shoobx Mock S3 Setup
"""
import glob
import os

from setuptools import find_packages, setup
Expand Down Expand Up @@ -43,10 +42,10 @@ def read(fname):
'License :: OSI Approved :: Zope Public License',
'Programming Language :: Python',
'Programming Language :: Python :: 3',
'Programming Language :: Python :: 3.7',
'Programming Language :: Python :: 3.8',
'Programming Language :: Python :: 3.9',
'Programming Language :: Python :: 3.10',
'Programming Language :: Python :: 3.11',
'Programming Language :: Python :: Implementation :: CPython',
'Programming Language :: Python :: Implementation :: PyPy',
'Natural Language :: English',
Expand All @@ -58,14 +57,14 @@ def read(fname):
'boto3',
'moto[server]>=3.0.0',
'flask_cors',
'pytz',
],
extras_require=dict(
test=[
'coverage',
'freezegun',
'junitxml',
'mock',
"tox",
'python-subunit',
'zope.testrunner'],
dev=['ipdb', 'pdbpp'],
Expand Down
11 changes: 9 additions & 2 deletions tox.ini
Original file line number Diff line number Diff line change
@@ -1,9 +1,16 @@
[tox]
envlist = py37, py38, py39, py310
envlist = py38, py39, py310, py311

[gh-actions]
python =
3.8: py38
3.9: py39
3.10: py310
3.11: py311

[testenv]
commands =
coverage run {envbindir}/zope-testrunner -vpc1 --all --test-path ./src
coverage run {envbindir}/zope-testrunner -vvc1 --all --test-path ./src
coverage xml
coverage report -m
deps =
Expand Down

0 comments on commit 05b91cb

Please sign in to comment.