-
Notifications
You must be signed in to change notification settings - Fork 11
107 lines (85 loc) · 2.55 KB
/
test.yml
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
name: test
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
jobs:
check-install:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install OQpy using pip
run: pip install .
- name: Import OQpy and print version
run: python -c "import oqpy; print(oqpy.__version__)"
check-style:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
make install-poetry
poetry --version
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-root
- name: Run black
run: poetry run make check-format
- name: Run mypy
run: poetry run make check-mypy
- name: Run pylint
run: poetry run make check-pylint
- name: Run pydocstyle
run: poetry run make check-pydocstyle
- name: Run cffconvert
run: poetry run make check-citation
- name: Install OQpy using pip
run: poetry run pip install .
- name: Build and check docs
run: poetry run make docs
check-tests:
strategy:
matrix:
os: [ ubuntu-latest ]
python-version: [ "3.8", "3.9", "3.10", "3.11" ]
runs-on: ${{ matrix.os }}
steps:
- name: Check out OQpy
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
id: setup-python
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
make install-poetry poetry_version=1.5.1
poetry --version
poetry config virtualenvs.in-project true
- name: Install dependencies
run: poetry install --no-root
- name: Install OQpy using pip
run: poetry run pip install .
- name: Run pytest
run: poetry run make check-tests