Skip to content
This repository has been archived by the owner on Jan 25, 2022. It is now read-only.

Commit

Permalink
Merge bb9f4c9 into 5925a8c
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Apr 8, 2021
2 parents 5925a8c + bb9f4c9 commit 765983f
Show file tree
Hide file tree
Showing 11 changed files with 33 additions and 91 deletions.
13 changes: 3 additions & 10 deletions .github/workflows/functional.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,22 +30,17 @@ jobs:
with:
python-version: "3.8"

- name: Install virtualenv
- name: Install dependencies
run: |
pip install virtualenv
virtualenv --python=python3 .venv
make install-dev
- name: Print environment
run: |
source .venv/bin/activate
python --version
pip --version
- name: Install dependencies
run: |
source .venv/bin/activate
make install-dev
- name: Start autograph
run: |
docker pull --quiet mozilla/autograph
Expand All @@ -59,10 +54,8 @@ jobs:
- name: Start Kinto
run: |
source .venv/bin/activate
make run-kinto & sleep 5
- name: Functional Tests
run: |
source .venv/bin/activate
tox -e functional
make functional
10 changes: 2 additions & 8 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,20 +18,14 @@ jobs:
- name: Install virtualenv
run: |
pip install virtualenv
virtualenv --python=python3 .venv
make install-dev
- name: Print environment
run: |
source .venv/bin/activate
python --version
pip --version
- name: Install dependencies
run: |
source .venv/bin/activate
pip install tox
- name: Lint
run: |
source .venv/bin/activate
tox -e lint
make lint
21 changes: 4 additions & 17 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,6 @@ jobs:
chore:
name: Unit Tests
runs-on: ubuntu-latest
strategy:
matrix:
toxenv: [py38]
include:
- toxenv: py38
python-version: "3.8"

services:
postgres:
Expand All @@ -34,12 +28,12 @@ jobs:

- uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
python-version: "3.8"

- name: Install virtualenv
run: |
pip install virtualenv
virtualenv --python=python3 .venv
make install-dev
- name: Print environment
run: |
Expand All @@ -53,18 +47,11 @@ jobs:
run: |
psql -c "CREATE DATABASE testdb ENCODING 'UTF8' TEMPLATE template0;" -U postgres -h localhost
- name: Install dependencies
run: |
source .venv/bin/activate
make install-dev
- name: Tox
- name: Tests
run: |
source .venv/bin/activate
tox -e ${{ matrix.toxenv }}
make tests
- name: Coveralls
uses: AndreMiras/coveralls-python-action@develop
if: matrix.toxenv == 'py38'
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
1 change: 0 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
.cache
.tox
.coverage
records.json
*.pyc
Expand Down
12 changes: 8 additions & 4 deletions Makefile
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
VIRTUALENV = virtualenv --python python3.6
VIRTUALENV = virtualenv --python python3
VENV := $(shell echo $${VIRTUAL_ENV-$$PWD/.venv})
PYTHON = $(VENV)/bin/python
DEV_STAMP = $(VENV)/.dev_env_installed.stamp
Expand All @@ -13,6 +13,7 @@ OBJECTS = .venv .coverage
all: install
install: $(INSTALL_STAMP)
$(INSTALL_STAMP): $(PYTHON) setup.py
$(VENV)/bin/pip install -r requirements.txt
$(VENV)/bin/pip install -e .
touch $(INSTALL_STAMP)

Expand All @@ -35,12 +36,14 @@ build-requirements:
tests-once: install-dev
$(VENV)/bin/py.test --cov-report term-missing --cov-fail-under 100 --cov kinto_signer

tests: install-dev
$(VENV)/bin/tox
tests: tests-once

black: install-dev
$(VENV)/bin/black kinto_signer tests scripts

lint: install-dev
$(VENV)/bin/therapist run --use-tracked-files kinto_signer tests scripts

clean:
find . -name '*.pyc' -delete
find . -name '__pycache__' -type d | xargs rm -fr
Expand All @@ -49,7 +52,7 @@ distclean: clean
rm -fr *.egg *.egg-info/

maintainer-clean: distclean
rm -fr .venv/ .tox/ dist/ build/
rm -fr .venv/ dist/ build/

run-kinto: install-dev
$(VENV)/bin/python --version
Expand All @@ -69,3 +72,4 @@ need-kinto-running:

functional: install-dev need-kinto-running
$(VENV)/bin/py.test tests/functional.py
python scripts/e2e.py --editor-auth=token:edit --source-bucket=stage --source-col=e2e
1 change: 0 additions & 1 deletion dev-requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,6 @@ pytest-watch
pytest-cache
pytest-cov
statsd
tox
webtest
kinto[postgresql]
kinto-attachment
Expand Down
1 change: 0 additions & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ exclude = '''
\.git
| \.hg
| \.mypy_cache
| \.tox
| \.venv
| _build
| buck-out
Expand Down
23 changes: 12 additions & 11 deletions requirements.txt
Original file line number Diff line number Diff line change
@@ -1,19 +1,19 @@
attrs==20.3.0
bcrypt==3.2.0
boto3==1.17.27
botocore==1.20.27
boto3==1.17.47
botocore==1.20.47
canonicaljson-rs==0.3.0
certifi==2020.12.5
cffi==1.14.5
chardet==4.0.0
colander==1.8.3
colorama==0.4.4
cornice==5.1.0
cornice==5.2.0
cornice-swagger==1.0.0
dockerflow==2020.10.0
docutils==0.16
ecdsa==0.16.1
hupper==1.10.2
idna==3.1
idna==2.10
iso8601==0.1.14
jmespath==0.10.0
jsonpatch==1.32
Expand All @@ -26,22 +26,23 @@ PasteDeploy==2.1.1
plaster==1.0
plaster-pastedeploy==0.7
pycparser==2.20
pyramid==2.0
pyramid==1.10.8
pyramid-mailer==0.15.1
pyramid-multiauth==0.9.0
pyramid-tm==2.4
pyrsistent==0.17.3
python-dateutil==2.8.1
repoze.lru==0.7
repoze.sendmail==4.4.1
requests==2.25.1
requests-hawk==1.1.0
s3transfer==0.3.4
simplejson==3.17.2
s3transfer==0.3.6
six==1.15.0
transaction==3.0.1
translationstring==1.4
ujson==4.0.2
urllib3==1.26.3
urllib3==1.26.4
venusian==3.0.0
waitress==2.0.0
WebOb==1.8.7
zope.deprecation==4.4.0
zope.interface==5.2.0
zope.interface==5.3.0
3 changes: 3 additions & 0 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -6,3 +6,6 @@ universal = 1

[coverage:run]
relative_files = True

[flake8]
max-line-length = 99
2 changes: 1 addition & 1 deletion tests/test_signoff_flow.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ def get_app_settings(cls, extras=None):
settings = super().get_app_settings(extras)

settings["storage_backend"] = "kinto.core.storage.postgresql"
db = "postgres://postgres:postgres@localhost/testdb"
db = "postgresql://postgres:postgres@localhost/testdb"
settings["storage_url"] = db
settings["permission_backend"] = "kinto.core.permission.postgresql"
settings["permission_url"] = db
Expand Down
37 changes: 0 additions & 37 deletions tox.ini

This file was deleted.

0 comments on commit 765983f

Please sign in to comment.