Skip to content

test: hookcmds integration tests for secret access and port managemen… #7083

test: hookcmds integration tests for secret access and port managemen…

test: hookcmds integration tests for secret access and port managemen… #7083

name: Hello Charm Tests
on:
push:
branches:
- main
pull_request:
workflow_call:
workflow_dispatch:
permissions: {}
jobs:
build-wheels:
uses: ./.github/workflows/_build-wheels.yaml
hello-charm-tests:
runs-on: ubuntu-latest
needs: build-wheels
strategy:
matrix:
include:
- charm-repo: jnsgruk/hello-kubecon
commit: eb3225860cc7db0e071d0ea6cd4a01b47e66b1e5 # 2025-03-27T12:05:21Z
- charm-repo: juju/hello-juju-charm
commit: 046b8ce758660d5aa9cf05207e2370fcbab688d0 # 2021-12-16T10:10:24Z
steps:
- name: Set up Python 3.10
uses: actions/setup-python@v6
with:
python-version: '3.10'
- name: Checkout the ${{ matrix.charm-repo }} repository
uses: actions/checkout@v6.0.2
with:
repository: ${{ matrix.charm-repo }}
persist-credentials: false
ref: ${{ matrix.commit }}
- name: Download operator wheels
uses: actions/download-artifact@v8
with:
name: ${{ needs.build-wheels.outputs.artifact-name }}
path: operator-wheels
- name: Remove 'ops' from charm requirements.txt
run: |
sed -i -e "/^ops[ ><=]/d" -e "/canonical\/operator/d" -e "/#egg=ops/d" requirements.txt
ops_wheel="$(ls operator-wheels/ops-[0-9]*.whl)"
echo -e "\n${ops_wheel}" >> requirements.txt
- name: Install dependencies
run: pip install -r requirements-dev.txt
- name: Run the charm tests
run: |
export PYTHONPATH="lib:src:$PYTHONPATH"
python3 -m unittest