3
3
# This file is part of Invenio.
4
4
# Copyright (C) 2020 CERN.
5
5
# Copyright (C) 2022 Graz University of Technology.
6
+ # Copyright (C) 2024 KTH Royal Institute of Technology.
6
7
#
7
8
# Invenio is free software; you can redistribute it and/or modify it
8
9
# under the terms of the MIT License; see LICENSE file for more details.
@@ -11,9 +12,11 @@ name: CI
11
12
12
13
on :
13
14
push :
14
- branches : master
15
+ branches :
16
+ - master
15
17
pull_request :
16
- branches : master
18
+ branches :
19
+ - master
17
20
schedule :
18
21
# * is a special character in YAML so you have to quote this string
19
22
- cron : " 0 3 * * 6"
25
28
default : " Manual trigger"
26
29
27
30
jobs :
28
- Tests :
29
- runs-on : ubuntu-20.04
30
- strategy :
31
- matrix :
32
- # You can add/remove combinations e.g. `dev` requirements or `postgresql13` by adding
33
- # a new item to the following lists.
34
- # You can see the complete list of services and versions that are available at:
35
- # https://docker-services-cli.readthedocs.io/en/latest/configuration.html
36
- python-version : [3.8, 3.9]
37
- requirements-level : [pypi]
38
- cache-service : [redis]
39
- db-service : [postgresql14]
40
- mq-service : [rabbitmq]
41
- search-service : [opensearch2]
42
-
43
- env :
44
- CACHE : ${{ matrix.cache-service }}
45
- DB : ${{ matrix.db-service }}
46
- MQ : ${{ matrix.mq-service }}
47
- SEARCH : ${{ matrix.search-service }}
48
- EXTRAS : tests,${{matrix.search-service}}
49
-
50
- steps :
51
- - name : Checkout
52
- uses : actions/checkout@v2
53
-
54
- - name : Set up Python ${{ matrix.python-version }}
55
- uses : actions/setup-python@v2
56
- with :
57
- python-version : ${{ matrix.python-version }}
58
-
59
- - name : Generate dependencies
60
- run : |
61
- pip install wheel requirements-builder
62
- requirements-builder -e "$EXTRAS" --level=${{ matrix.requirements-level }} setup.py > .${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt
63
-
64
- - name : Cache pip
65
- uses : actions/cache@v2
66
- with :
67
- path : ~/.cache/pip
68
- key : ${{ runner.os }}-pip-${{ hashFiles('.${{ matrix.requirements-level }}-${{ matrix.python-version }}-requirements.txt') }}
69
-
70
- - name : Install dependencies
71
- run : |
72
- pip install -r .${{matrix.requirements-level}}-${{ matrix.python-version }}-requirements.txt
73
- pip install ".[$EXTRAS]"
74
- pip freeze
75
- docker --version
76
- docker-compose --version
77
-
78
- - name : Run tests
79
- run : |
80
- ./run-tests.sh
31
+ Python :
32
+ uses : inveniosoftware/workflows/.github/workflows/tests-python.yml@master
33
+ with :
34
+ extras : " tests"
0 commit comments