add how change log level by API #107
Workflow file for this run
This file contains hidden or 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
| # Copyright 2026 Telefónica Soluciones de Informática y Comunicaciones de España, S.A.U. | |
| # | |
| # This file is part of kafnus-connect | |
| # | |
| # kafnus-connect is free software: you can redistribute it and/or | |
| # modify it under the terms of the GNU Affero General Public License as | |
| # published by the Free Software Foundation, either version 3 of the | |
| # License, or (at your option) any later version. | |
| # | |
| # kafnus-connect is distributed in the hope that it will be useful, | |
| # but WITHOUT ANY WARRANTY; without even the implied warranty of | |
| # MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Affero | |
| # General Public License for more details. | |
| # | |
| # You should have received a copy of the GNU Affero General Public License | |
| # along with kafnus. If not, see http://www.gnu.org/licenses/. | |
| name: Run tests | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| jobs: | |
| smt-unit-tests: | |
| runs-on: ubuntu-24.04 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Java 17 | |
| uses: actions/setup-java@v4 | |
| with: | |
| distribution: temurin | |
| java-version: "17" | |
| cache: maven | |
| - name: Run SMT unit tests with coverage | |
| run: mvn -B -f src/kafnus-connect-smt/pom.xml clean verify | |
| - name: Upload JaCoCo report artifact | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: jacoco-report | |
| path: src/kafnus-connect-smt/target/site/jacoco/ | |
| - name: Upload coverage to Coveralls | |
| uses: coverallsapp/github-action@v2 | |
| with: | |
| github-token: ${{ secrets.GITHUB_TOKEN }} | |
| file: src/kafnus-connect-smt/target/site/jacoco/jacoco.xml | |
| format: jacoco | |
| e2e-tests: | |
| runs-on: ubuntu-24.04 | |
| env: | |
| KAFNUS_TESTS_USE_EXTERNAL_POSTGIS: "false" | |
| KAFNUS_TESTS_E2E_MANUAL_INSPECTION: "false" | |
| KAFNUS_TESTS_LOG_LEVEL: DEBUG | |
| KAFNUS_DBPATH_POSTGIS: /data/postgis | |
| KAFNUS_POSTGIS_IMAGE: postgis/postgis:15-3.3 | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Set up Python 3.11 | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: "3.11" | |
| - name: Cache Python dependencies | |
| uses: actions/cache@v3 | |
| with: | |
| path: ~/.cache/pip | |
| key: ${{ runner.os }}-pip-${{ hashFiles('tests/requirements.txt') }} | |
| restore-keys: | | |
| ${{ runner.os }}-pip- | |
| - name: Install dependencies | |
| working-directory: tests | |
| run: | | |
| python -m venv .venv | |
| source .venv/bin/activate | |
| pip install --upgrade pip | |
| pip install -r requirements.txt | |
| - name: Ensure kafka-postgis-net exists | |
| run: | | |
| if ! docker network ls | grep -q kafka-postgis-net; then | |
| docker network create kafka-postgis-net | |
| fi | |
| - name: Setup PostGIS data directory | |
| run: | | |
| sudo mkdir -p /data/postgis | |
| sudo chown -R 999:999 /data/postgis | |
| - name: Pre-pull required docker images | |
| run: | | |
| docker pull postgis/postgis:15-3.3 | |
| docker pull apache/kafka:4.2.0 | |
| docker pull mongo:8.0 | |
| - name: Build kafnus-connect image | |
| working-directory: . | |
| run: | | |
| docker build --no-cache -t kafnus-connect . | |
| - name: Run with pytest | |
| working-directory: tests | |
| run: | | |
| source .venv/bin/activate | |
| pytest -s test_pipeline.py |