Skip to content

Commit

Permalink
tests: update test matrix
Browse files Browse the repository at this point in the history
* pytest-black -> pytest-black-ng, since former is unsupported
  • Loading branch information
utnapischtim committed Apr 2, 2024
1 parent 33a7c18 commit e4422e4
Show file tree
Hide file tree
Showing 2 changed files with 10 additions and 23 deletions.
29 changes: 8 additions & 21 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2020 CERN.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 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 Down Expand Up @@ -30,18 +30,15 @@ jobs:
timeout-minutes: 20
strategy:
matrix:
python-version: [3.8, 3.9]
python-version: ["3.9", "3.12"]
requirements-level: [pypi]
db-service: [postgresql14,postgresql13,mysql8]
db-service: [postgresql14, mysql8]
mq-service: [rabbitmq]
search-service: [opensearch2,elasticsearch7]
search-service: [opensearch2]
include:
- db-service: postgresql14
DB_EXTRAS: "postgresql"

- db-service: postgresql13
DB_EXTRAS: "postgresql"

- db-service: mysql8
DB_EXTRAS: "mysql"
env:
Expand All @@ -51,27 +48,17 @@ jobs:
EXTRAS: tests,${{ matrix.search-service }}
steps:
- name: Checkout
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}

- name: Generate dependencies
run: |
pip install wheel requirements-builder
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
with:
path: ~/.cache/pip
key: ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
cache: pip
cache-dependency-path: setup.cfg

- name: Install dependencies
run: |
pip install -r .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
pip install ".[$EXTRAS]"
pip freeze
docker --version
Expand Down
4 changes: 2 additions & 2 deletions setup.cfg
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
#
# This file is part of Invenio.
# Copyright (C) 2015-2018 CERN.
# Copyright (C) 2022 Graz University of Technology.
# Copyright (C) 2022-2024 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 Down Expand Up @@ -38,7 +38,7 @@ install_requires =

[options.extras_require]
tests =
pytest-black>=0.3.0
pytest-black-ng>=0.4.0
invenio-indexer>=2.1.0,<3.0.0
invenio-jsonschemas>=1.1.3,<2.0.0
mock>=1.3.0
Expand Down

0 comments on commit e4422e4

Please sign in to comment.