Merging fetch changes into interactive_sampler_learning #521
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: predicators | |
on: [push] | |
jobs: | |
unit-tests: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- run: | | |
pip install -e . | |
pip install pytest-cov | |
- name: Pytest | |
run: | | |
pytest -s tests/ --cov-config=.coveragerc --cov=predicators/ --cov=tests/ --cov-fail-under=100 --cov-report=term-missing:skip-covered | |
env: | |
PYTHONHASHSEED: 0 | |
static-type-checking: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
pip install -U git+https://github.com/python/mypy.git@9a10967fdaa2ac077383b9eccded42829479ef31 | |
# Note: if mypy issue #5485 gets resolved, we can install from head again. | |
- name: Mypy | |
run: | | |
mypy . --config-file mypy.ini | |
lint: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Install dependencies | |
run: | | |
pip install -e . | |
pip install pytest-pylint | |
- name: Pylint | |
run: | | |
pytest . --pylint -m pylint --pylint-rcfile=.predicators_pylintrc | |
env: | |
PYTHONHASHSEED: 0 | |
autoformat: | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [3.8] | |
steps: | |
- uses: actions/checkout@v2 | |
- name: Set up Python ${{ matrix.python-version }} | |
uses: actions/setup-python@v2 | |
with: | |
python-version: ${{ matrix.python-version }} | |
cache: 'pip' | |
cache-dependency-path: '**/setup.py' | |
- name: Run YAPF to test if python code is correctly formatted | |
uses: AlexanderMelde/yapf-action@master | |
with: | |
args: --verbose --style .style.yapf --exclude '**/third_party' | |
- name: Run isort to organize imports | |
uses: isort/isort-action@master |