diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml new file mode 100644 index 0000000..01d4584 --- /dev/null +++ b/.github/workflows/ci.yaml @@ -0,0 +1,41 @@ +# Copyright 2025 Canonical Ltd. +# See LICENSE file for licensing details. +# Adapted from: https://github.com/canonical/postgresql-operator/blob/main/.github/workflows/ci.yaml +name: Lint and test + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +on: + pull_request: + paths-ignore: + - '.gitignore' + - 'LICENSE' + - '**.md' + + workflow_dispatch: + +jobs: + lint: + name: Lint + uses: canonical/data-platform-workflows/.github/workflows/lint.yaml@v35.0.2 + + unit-test: + name: Unit test charm + runs-on: ${{ matrix.os }} + strategy: + fail-fast: false + matrix: + os: + - ubuntu-22.04 + - ubuntu-24.04 + timeout-minutes: 5 + steps: + - name: Checkout + uses: actions/checkout@v5 + - name: Install tox & poetry + run: | + pipx install tox + - name: Run tests + run: tox run -e unit diff --git a/src/charm.py b/src/charm.py index e49baf7..3cd65e3 100755 --- a/src/charm.py +++ b/src/charm.py @@ -45,7 +45,7 @@ class ClientCharmError(Exception): def log_error(text, event=None): if text: # Sometimes the subprocess output is empty - logger.critical(text) + logger.critical(text + "hnfoseorgioesrgiesoshgosenguregoerifbvgujvnfdksbvjdfksvbdkbvfjdskbfdjksvbfkjfdkjvbjkdsfvfndbkfdbsjkd") if event: event.log(text) event.fail()