Skip to content

Commit 577dea0

Browse files
committed
ci: update python tests workflow configuration
1 parent 7aad3db commit 577dea0

File tree

1 file changed

+35
-2
lines changed

1 file changed

+35
-2
lines changed

.github/workflows/tests.yml

Lines changed: 35 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,6 @@ on:
1818
- master
1919
- "maint-**"
2020
schedule:
21-
# * is a special character in YAML so you have to quote this string
2221
- cron: "0 3 * * 6"
2322
workflow_dispatch:
2423
inputs:
@@ -29,7 +28,41 @@ on:
2928

3029
jobs:
3130
python-tests:
32-
uses: inveniosoftware/workflows/.github/workflows/tests-python.yml@master
31+
runs-on: ubuntu-24.04
32+
strategy:
33+
fail-fast: false
34+
matrix:
35+
python-version: ["3.9", "3.12"]
36+
db-service: ["postgresql14"]
37+
search-service: ["opensearch2"]
38+
39+
env:
40+
DB: ${{ matrix.db-service }}
41+
SEARCH: ${{ matrix.search-service }}
42+
EXTRAS: tests,${{ matrix.search-service }}
43+
44+
steps:
45+
- name: Checkout
46+
uses: actions/checkout@v4
47+
48+
- name: Set up Python ${{ matrix.python-version }}
49+
uses: actions/setup-python@v5
50+
with:
51+
python-version: ${{ matrix.python-version }}
52+
cache: pip
53+
cache-dependency-path: setup.cfg
54+
55+
- name: Install dependencies
56+
run: |
57+
pip install --upgrade pip
58+
pip install --use-deprecated=legacy-resolver ".[$EXTRAS]"
59+
pip freeze
60+
- name: Clean pycache
61+
run: |
62+
find . -type d -name "__pycache__" -exec rm -r {} +
63+
find . -type f -name "*.pyc" -delete
64+
- name: Run tests
65+
run: ./run-tests.sh
3366

3467
JS:
3568
uses: inveniosoftware/workflows/.github/workflows/tests-js.yml@master

0 commit comments

Comments
 (0)