forked from the-library-code/dspace-rest-python
-
Notifications
You must be signed in to change notification settings - Fork 1
65 lines (52 loc) · 1.56 KB
/
Copy pathtests.yml
File metadata and controls
65 lines (52 loc) · 1.56 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
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: Set up Python
uses: actions/setup-python@v6
with:
python-version: "3.12"
- name: Install pre-commit
run: pip install pre-commit==4.2.0
- name: Ruff
run: pre-commit run ruff --all-files
- name: Pylint
run: pre-commit run pylint --all-files
# Non-blocking: strict typing is being introduced incrementally, so a
# mypy finding is reported in the log but does not fail the job. The
# version is pinned by the mirrors-mypy rev in .pre-commit-config.yaml.
- name: Mypy
continue-on-error: true
run: pre-commit run mypy --all-files