forked from the-library-code/dspace-rest-python
-
Notifications
You must be signed in to change notification settings - Fork 1
68 lines (54 loc) · 1.53 KB
/
Copy pathtests.yml
File metadata and controls
68 lines (54 loc) · 1.53 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
name: Tests
on:
push:
branches: [ dtq ]
pull_request:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
# Matches the DSpace-ISstag-integration consumer CI matrix.
python-version: ["3.10", "3.12"]
steps:
- uses: actions/checkout@v6
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
cache: pip
cache-dependency-path: |
pyproject.toml
requirements-test.txt
- name: Install package + test deps
run: |
python -m pip install --upgrade pip
pip install .
pip install -r requirements-test.txt
- name: Run tests
run: python -m pytest tests/ -v
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Ruff
run: uvx ruff@0.12.7 check dspace_rest_client tests
- name: Pylint
run: >-
uvx --with requests --with pysolr pylint@3.3.7
--rcfile=pyproject.toml dspace_rest_client
typecheck:
runs-on: ubuntu-latest
# Non-blocking: strict typing is being introduced incrementally.
continue-on-error: true
steps:
- uses: actions/checkout@v6
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Mypy
run: uvx --with requests --with pysolr mypy dspace_rest_client