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

Commit

Permalink
Get rid of Tox
Browse files Browse the repository at this point in the history
  • Loading branch information
leplatrem committed Apr 8, 2021
1 parent 7234fdc commit bb9f4c9
Show file tree
Hide file tree
Showing 9 changed files with 19 additions and 79 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
11 changes: 7 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 Down Expand Up @@ -36,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 @@ -50,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 @@ -70,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
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
37 changes: 0 additions & 37 deletions tox.ini

This file was deleted.

0 comments on commit bb9f4c9

Please sign in to comment.