diff --git a/.github/workflows/python-tests.yml b/.github/workflows/python-tests.yml new file mode 100644 index 00000000..faeed100 --- /dev/null +++ b/.github/workflows/python-tests.yml @@ -0,0 +1,36 @@ +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 . + test: + 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: pip install --progress-bar off . + - run: python setup.py test diff --git a/README.md b/README.md index 67b42266..a6d20670 100644 --- a/README.md +++ b/README.md @@ -1,5 +1,7 @@ # optuna-dashboard +![tests](https://github.com/c-bata/optuna-dashboard/workflows/tests/badge.svg) + Real-time dashboard for [Optuna](https://github.com/optuna/optuna). Code files were originally taken from [Goptuna](https://github.com/c-bata/goptuna).