-
-
Notifications
You must be signed in to change notification settings - Fork 91
69 lines (69 loc) · 2.4 KB
/
python-tests.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
name: tests
on:
pull_request:
branches:
- main
paths:
- '.github/workflows/python-tests.yml'
- '**.py'
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.10'
architecture: x64
- name: Install dependencies
# python_tests requires optuna>=3.0.0 since it imports FloatDistribution
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off "optuna>=3.0.0"
pip install --progress-bar off .
pip install --progress-bar off flake8 black isort mypy mypy-boto3-s3
- run: flake8 . --show-source
- run: black --check --diff .
- run: isort --check --diff .
- run: mypy optuna_dashboard python_tests
test:
runs-on: ubuntu-latest
strategy:
matrix:
# Add Python '3.11' after released Optuna v3.1
# since Optuna v3.0.4 depends on scipy<1.9.0 and >=1.7.0
python-version: ['3.7', '3.8', '3.9', '3.10']
steps:
- uses: actions/checkout@v2
- name: Setup Python${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install dependencies
# python_tests requires optuna>=3.0.0 since it imports FloatDistribution
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .[optional]
pip install --progress-bar off .[test]
pip install --progress-bar off "optuna>=3.0.0"
pip install --progress-bar off .
- run: pytest python_tests
test-with-optuna-master:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.x'
architecture: x64
- name: Install dependencies
run: |
python -m pip install --progress-bar off --upgrade pip setuptools
pip install --progress-bar off .[optional]
pip install --progress-bar off .[test]
pip install --progress-bar off .
python -m pip install --progress-bar off --upgrade git+https://github.com/optuna/optuna.git
- run: pytest python_tests