Skip to content

Commit

Permalink
global: clean test infrastructure
Browse files Browse the repository at this point in the history
  • Loading branch information
utnapischtim committed Jun 14, 2022
1 parent cb7dc00 commit 899d73d
Show file tree
Hide file tree
Showing 2 changed files with 24 additions and 8 deletions.
19 changes: 15 additions & 4 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
@@ -1,3 +1,12 @@
# -*- coding: utf-8 -*-
#
# 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.

name: CI

on:
Expand All @@ -20,9 +29,11 @@ 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 @@ -35,7 +46,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 @@ -46,7 +57,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
13 changes: 9 additions & 4 deletions run-tests.sh
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,12 @@
# 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.

pydocstyle invenio_logging && \
check-manifest && \
sphinx-build -qnNW docs docs/_build/html && \
python setup.py test
# Quit on errors
set -o errexit

# Quit on unbound symbols
set -o nounset

python -m check_manifest
python -m sphinx.cmd.build -qnNW docs docs/_build/html
python -m pytest

0 comments on commit 899d73d

Please sign in to comment.