Skip to content

Commit

Permalink
global: clean test infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim authored and kpsherva committed Jun 7, 2022
1 parent 53f0317 commit 9930e86
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 9 deletions.
12 changes: 7 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -28,9 +29,10 @@ jobs:
runs-on: ubuntu-20.04
strategy:
matrix:
python-version: [3.6, 3.7, 3.8]
requirements-level: [min, pypi]

python-version: [3.7, 3.8, 3.9]
requirements-level: [pypi]
env:
EXTRAS: tests
steps:
- name: Checkout
uses: actions/checkout@v2
Expand All @@ -43,7 +45,7 @@ jobs:
- name: Generate dependencies
run: |
pip install wheel requirements-builder
requirements-builder -e tests --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
- name: Cache pip
uses: actions/cache@v2
Expand All @@ -54,7 +56,7 @@ jobs:
- name: Install dependencies
run: |
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install .[all]
pip install .[$EXTRAS]
pip freeze
- name: Run tests
Expand Down
6 changes: 4 additions & 2 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2018-2020 CERN.
# Copyright (C) 2022 Graz University of Technology.
#
# Invenio is free software; you can redistribute it and/or modify it
# under the terms of the MIT License; see LICENSE file for more details.
Expand All @@ -13,7 +14,8 @@ set -o errexit
# Quit on unbound symbols
set -o nounset

python -m check_manifest --ignore ".*-requirements.txt"
python -m check_manifest
python -m sphinx.cmd.build -qnNW docs docs/_build/html
python -m pytest
python -m sphinx.cmd.build -qnNW -b doctest docs docs/_build/doctest
tests_exit_code=$?
exit "$tests_exit_code"
9 changes: 7 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ classifiers =
[options]
include_package_data = True
packages = find:
python_requires = >=3.6
python_requires = >=3.7
zip_safe = False
install_requires =
boto3>=1.9.91
Expand All @@ -36,8 +36,9 @@ tests =
pytest-invenio>=1.4.2
invenio-base>=1.2.5
invenio-app>=1.3.1
invenio-db[all]>=1.0.9
invenio-db>=1.0.9
moto>=1.3.7
mock>=4.0.0
redis>=2.10.5
Sphinx==4.2.0

Expand All @@ -61,6 +62,10 @@ add_ignore = D401
[isort]
profile=black

[check-manifest]
ignore =
*-requirements.txt

[tool:pytest]
addopts = --black --isort --pydocstyle --doctest-glob="*.rst" --doctest-modules --cov=invenio_s3 --cov-report=term-missing
testpaths = tests invenio_s3

0 comments on commit 9930e86

Please sign in to comment.