mirror of
https://github.com/wassname/optuna-dashboard.git
synced 2026-08-28 12:53:04 +08:00
41 lines
1.0 KiB
YAML
41 lines
1.0 KiB
YAML
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@v2
|
|
with:
|
|
python-version: '3.x'
|
|
architecture: x64
|
|
- name: Install dependencies
|
|
run: |
|
|
python -m pip install --upgrade pip setuptools
|
|
pip install --progress-bar off .[lint]
|
|
- run: flake8 . --show-source
|
|
- run: black --check .
|
|
- run: mypy .
|
|
test:
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
python-version: [3.6, 3.7, 3.8, 3.9]
|
|
steps:
|
|
- uses: actions/checkout@v2
|
|
- name: Setup Python${{ matrix.python-version }}
|
|
uses: actions/setup-python@v2
|
|
with:
|
|
python-version: ${{ matrix.python-version }}
|
|
architecture: x64
|
|
- name: Install dependencies
|
|
run: pip install --progress-bar off .
|
|
- run: python setup.py test
|