1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162 |
- name: kafkaesk
- on: [push]
- jobs:
- # Job to run pre-checks
- pre-checks:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: [3.8]
- steps:
- - name: Checkout the repository
- uses: actions/checkout@v2
- - name: Setup Python
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
- - name: Install package
- run: |
- pip install poetry
- poetry install
- - name: Run pre-checks
- run: |
- poetry run flake8 kafkaesk --config=.flake8
- poetry run mypy kafkaesk/
- poetry run isort -c -rc kafkaesk/
- poetry run black --check --verbose kafkaesk
- # Job to run tests
- tests:
- runs-on: ubuntu-latest
- strategy:
- matrix:
- python-version: [3.8]
- steps:
- - name: Checkout the repository
- uses: actions/checkout@v2
- - name: Setup Python
- uses: actions/setup-python@v1
- with:
- python-version: ${{ matrix.python-version }}
- - name: Start Docker containers for Zookeeper and Kafka
- run: docker-compose up -d
- - name: Install the package
- run: |
- pip install poetry
- poetry install
- - name: Run tests
- run: |
- poetry run pytest -rfE --reruns 2 --cov=kafkaesk -s --tb=native -v --cov-report xml --cov-append tests
- - name: Upload coverage to Codecov
- uses: codecov/codecov-action@v1
- with:
- file: ./coverage.xml
|