forked from fsfe/reuse-tool
-
Notifications
You must be signed in to change notification settings - Fork 0
133 lines (123 loc) · 3.47 KB
/
test.yaml
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
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# SPDX-FileCopyrightText: 2019 Free Software Foundation Europe e.V. <https://fsfe.org>
# SPDX-FileCopyrightText: 2022 Carmen Bianca Bakker <carmenbianca@fsfe.org>
# SPDX-FileCopyrightText: 2023 DB Systel GmbH
#
# SPDX-License-Identifier: GPL-3.0-or-later
name: Test suites
on:
push:
branches:
- main
pull_request:
jobs:
test:
runs-on: ${{ matrix.os }}
strategy:
max-parallel: 10
# do not abort the whole test job if one combination in the matrix fails
fail-fast: false
matrix:
python-version: ["3.8", "3.12"]
os: [ubuntu-22.04]
include:
- python-version: "3.8"
os: macos-latest
- python-version: "3.8"
os: windows-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v2
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
pip install poetry~=1.3.0
poetry install --no-interaction --only main,test
- name: Run tests with pytest
run: |
poetry run pytest --cov=reuse
pylint:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.3.0
poetry install --no-interaction --only main,dev,test
- name: Lint with Pylint
run: |
poetry run pylint src/reuse/ tests/
black:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.3.0
poetry install --no-interaction --only dev
- name: Test formatting with black
run: |
poetry run isort --check src/ tests/
poetry run black --check .
mypy:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.3.0
poetry install --no-interaction --only main,dev,test
- name: Test typing with mypy
run: |
poetry run mypy
prettier:
runs-on: ubuntu-22.04
container: node:latest
steps:
- uses: actions/checkout@v2
- name: Install prettier
run: npm install prettier@3.0.3
- name: Run prettier
run: npx prettier --check .
reuse:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.3.0
poetry install --no-interaction --only main
- name: Test REUSE compliance
run: make reuse
docs:
runs-on: ubuntu-22.04
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install dependencies
run: |
pip install poetry~=1.3.0
poetry install --no-interaction --only main,docs
- name: Create docs with Sphinx
run: |
make docs