Skip to content

Merge branch 'dev' into 576-restructure-documentation #2039

Merge branch 'dev' into 576-restructure-documentation

Merge branch 'dev' into 576-restructure-documentation #2039

Workflow file for this run

# This workflow will install Python dependencies, run tests and lint with a single version of Python
# For more information see: https://docs.github.com/en/actions/automating-builds-and-tests/building-and-testing-python
name: CI & CD
on:
push
permissions: write-all
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- name: Setup Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: poetry install
- name: Check Format with black
run: |
poetry run black --check .
- name: Check import order with isort
run: |
poetry run isort -c .
- name: Lint src with pylint
run: |
poetry run poe lint-src
- name: Lint tests with pylint
run: |
poetry run poe lint-tests
test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ci_index: [ 1, 2, 3, 4, 5, 6, 7, 8 ]
ci_total: [ 8 ]
steps:
- uses: actions/checkout@v3
- name: Set up Python 3.10
uses: actions/setup-python@v3
with:
python-version: "3.10"
- name: Add sumo ppa
run: sudo add-apt-repository ppa:sumo/stable
- name: Update apt cache
run: sudo apt update
- name: Install sumo
run: sudo apt-get install -y sumo
- name: Docker compose up
run: docker compose -f docker-compose.yaml -f docker-compose.test.yaml up -d grafana postgresql redis
- name: Install poetry
run: pipx install poetry
- name: Install dependencies
run: poetry install
- name: Test with pytest
run: |
poetry run poe test-ci
env:
CI_INDEX: ${{ matrix.ci_index }}
CI_TOTAL: ${{ matrix.ci_total }}
- name: Coveralls GitHub Action
uses: coverallsapp/[email protected]
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
path-to-lcov: coverage.xml
parallel: true
finish:
runs-on: ubuntu-latest
needs: test
steps:
- name: Close parallel build
uses: coverallsapp/[email protected]
with:
parallel-finished: true