Skip to content

Component Interactions, Remote CLI improvements. #601

Component Interactions, Remote CLI improvements.

Component Interactions, Remote CLI improvements. #601

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
go-build-test:
runs-on: ubuntu-latest
if: ${{ !github.event.pull_request.draft }}
timeout-minutes: 5
steps:
- uses: actions/checkout@v2
- name: Setup Go
uses: ./.github/actions/go
- name: Initialize Go module
run: |
cd caribou-go
if [ ! -f go.mod ]; then
go mod init caribou-go
fi
- name: Build Caribou Go
run: |
cd caribou-go
go build -buildmode=c-shared -o caribougo.so ./src/main/
- name: Run Go tests
run: |
cd caribou-go
go test ./... -gcflags=-l