Skip to content

rewrite safeopt, inherit from BaseAdvisor and align with the API. #75

rewrite safeopt, inherit from BaseAdvisor and align with the API.

rewrite safeopt, inherit from BaseAdvisor and align with the API. #75

Workflow file for this run

# https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: Test
on:
push:
branches:
- master
- dev
pull_request:
branches:
- master
- dev
workflow_dispatch:
env:
test-requires: "[test,extra]"
test-dir: test
pytest-args: >-
-rap
--durations=20
--verbose
# todo: Lint with flake8
# todo: tests conda
jobs:
tests-pip:
name: Tests (pip, Python ${{ matrix.python-version }}, ${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ "ubuntu-latest", "windows-latest" ] # todo support macos test
python-version: [ "3.8", "3.9", "3.10" ]
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install --upgrade wheel setuptools
pip install ".${{ env.test-requires }}"
- name: Run tests
run: |
pytest ${{ env.pytest-args }} ${{ env.test-dir }}
# - name: Upload coverage reports to Codecov with GitHub Action
# if: ${{ runner.os == 'Linux' && matrix.python-version == 3.8 }}
# uses: codecov/codecov-action@v3