Skip to content

Update documentation and Setup #490

Update documentation and Setup

Update documentation and Setup #490

Workflow file for this run

name: linting-and-tests
on:
pull_request:
types:
- opened
- reopened
- synchronize
- ready_for_review
branches:
- main
defaults:
run:
shell: bash -l {0}
jobs:
pep8:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup poetry
uses: ./.github/actions/poetry
- name: Run black
run: |
poetry run black --version
poetry run black --check caribou --verbose
pylint:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup poetry
uses: ./.github/actions/poetry
- name: Run pylint
run: |
poetry run pylint --version
poetry run pylint caribou
pytest:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup poetry
uses: ./.github/actions/poetry
- name: Run tests
run: |
set -e
poetry run pytest --cache-clear --cov=caribou/ --cov-fail-under=80
poetry run pytest --junitxml=pytest.xml --cov-report=term-missing:skip-covered --cov-fail-under=80 --cov=caribou caribou/tests | tee pytest-coverage.txt
- name: Pytest coverage comment
uses: MishaKav/pytest-coverage-comment@main
with:
pytest-coverage-path: ./pytest-coverage.txt
junitxml-path: ./pytest.xml
mypy:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup poetry
uses: ./.github/actions/poetry
- name: Run mypy
run: |
poetry run mypy --version
poetry run mypy caribou
isort:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup poetry
uses: ./.github/actions/poetry
- name: Run isort
run: |
poetry run isort --version
poetry run isort caribou --check --diff
integration-tests:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup poetry
uses: ./.github/actions/poetry
- name: Run integration tests
run: |
poetry run python integration_tests/run_integration_tests.py