Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
41 changes: 41 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -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
2 changes: 1 addition & 1 deletion src/charm.py
Original file line number Diff line number Diff line change
Expand Up @@ -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()
Expand Down
Loading