Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
34 commits
Select commit Hold shift + click to select a range
51e1c4b
jdl show
PietroPasotti Jul 7, 2025
ff8b379
lint
PietroPasotti Jul 7, 2025
706ba5a
lint
PietroPasotti Jul 7, 2025
e0bccf9
replace .pytest_jubilant_jdl with .logs
PietroPasotti Jul 7, 2025
24cad08
no references to juju debug-log
PietroPasotti Jul 7, 2025
af60010
pr comments
PietroPasotti Jul 11, 2025
c92b376
echo pwd for debugging
PietroPasotti Jul 11, 2025
0e9cc17
echo pwd for debugging
PietroPasotti Jul 11, 2025
157caef
minor lint
PietroPasotti Jul 14, 2025
08ba49b
minor lint
PietroPasotti Jul 14, 2025
ed42b55
printf lint
PietroPasotti Jul 14, 2025
19f2c95
dollars
PietroPasotti Jul 14, 2025
0f89835
Merge branch 'main' into feat/jdl-upload
PietroPasotti Jul 14, 2025
07e6f65
.logs without prefix
PietroPasotti Jul 14, 2025
d4eabcf
.logs without prefix
PietroPasotti Jul 14, 2025
51af1bd
merge cm
PietroPasotti Jul 21, 2025
c4d473c
include hidden files
PietroPasotti Jul 21, 2025
3efe189
unique names and lifted path to var
PietroPasotti Jul 21, 2025
0f42f3a
added abspath support
PietroPasotti Jul 21, 2025
7573884
echo the path
PietroPasotti Jul 22, 2025
3941a91
reecho the path
PietroPasotti Jul 23, 2025
1e584ba
wrap log path in expression
PietroPasotti Jul 23, 2025
1af4b03
add matrix suite to log upload file name
PietroPasotti Jul 23, 2025
1761712
Merge remote-tracking branch 'origin/main' into feat/jdl-upload
PietroPasotti Aug 26, 2025
ee57f07
graph update
PietroPasotti Aug 26, 2025
fbd1783
Merge branch 'main' into feat/jdl-upload
lucabello Apr 23, 2026
07b4840
fix: use case statement to avoid shellcheck SC2193 in log path detection
Copilot Apr 23, 2026
ed94e2f
Update .github/workflows/_charm-quality-checks.yaml
lucabello Apr 30, 2026
1d143c8
Update README.md
lucabello Apr 30, 2026
652dda7
Update .github/workflows/charm-pull-request.yaml
lucabello Apr 30, 2026
1cdc18b
Update .github/workflows/charm-pull-request.yaml
lucabello Apr 30, 2026
9719253
Update .github/workflows/_charm-quality-checks.yaml
lucabello Apr 30, 2026
f06d6e6
fix: address PR review comments for log handling
lucabello Apr 30, 2026
350665b
Merge branch 'main' into feat/jdl-upload
lucabello Apr 30, 2026
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
90 changes: 90 additions & 0 deletions .github/workflows/_charm-quality-checks.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,17 @@ on:
type: string
required: false
default: .
log-path:
type: string
description: |
Path to a directory where the .txt log files for an integration testing run will be stored.
Relative and absolute file paths are both allowed.
Relative paths are rooted against the charm directory specified by `charm-path`
(which defaults to the repository root, `.`).
Paths that begin with a wildcard character should be quoted to avoid being
interpreted as YAML aliases.
required: false
default: .logs
Comment thread
lucabello marked this conversation as resolved.
Comment thread
lucabello marked this conversation as resolved.
Comment thread
lucabello marked this conversation as resolved.
provider:
type: string
description: "The provider to choose for integration tests ('machine', 'microk8s', or 'k8s')"
Expand Down Expand Up @@ -273,6 +284,43 @@ jobs:
CHARM_PATH="$(realpath "$charm_relative_path")"
export CHARM_PATH
uvx tox -e integration
- name: Determine log files location
if: always()
id: get_log_path
env:
LOG_PATH: ${{ inputs.log-path }}
CHARM_PATH: ${{ inputs.charm-path }}
run: |
# if the user gave us a relative path, interpret it from the charm-path root.
# if path starts with / it's absolute, else it's relative, and we prepend the (absolute) charm-path to it
case "$LOG_PATH" in
/*) log_path="$LOG_PATH" ;;
*) log_path="$CHARM_PATH/$LOG_PATH" ;;
esac
echo "log path is: $log_path"
echo "log_path=$log_path" >> "$GITHUB_OUTPUT"
- name: Show logs
if: always()
env:
LOG_DIR: ${{ steps.get_log_path.outputs.log_path }}
run: |
if test -d "$LOG_DIR"; then
shopt -s nullglob
for filename in "$LOG_DIR"/*.txt; do
printf '\n::group:: %s\n' "$filename"
cat "$filename"
printf "\n::endgroup::\n"
done
else
echo "$LOG_DIR not found"
fi
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
with:
name: charm-logs${{ (inputs.charm-path && inputs.charm-path != '.') && format('-{0}', inputs.charm-path) || '' }}
include-hidden-files: true
path: ${{ steps.get_log_path.outputs.log_path }}

integration-matrix:
name: Define Integration tests matrix
Expand Down Expand Up @@ -403,3 +451,45 @@ jobs:
with:
timeout-minutes: 30
limit-access-to-actor: true
- name: Determine log files location
if: always()
id: get_log_path
env:
LOG_PATH: ${{ inputs.log-path }}
CHARM_PATH: ${{ inputs.charm-path }}
run: |
# if the user gave us a relative path, interpret it from the charm-path root.
# if path starts with / it's absolute, else it's relative, and we prepend the (absolute) charm-path to it
case "$LOG_PATH" in
/*) log_path="$LOG_PATH" ;;
*) log_path="$CHARM_PATH/$LOG_PATH" ;;
esac
echo "log path is: $log_path"
echo "log_path=$log_path" >> "$GITHUB_OUTPUT"
- name: Show logs
if: always()
env:
LOG_DIR: ${{ steps.get_log_path.outputs.log_path }}
run: |
if test -d "$LOG_DIR"; then
shopt -s nullglob
for filename in "$LOG_DIR"/*.txt; do
# begin collapsible log group for each file found in the folder;
# this is github CI markup
# cfr: https://github.com/go-task/task/issues/647
printf '\n::group:: %s\n' "$filename"
cat "$filename"
printf "\n::endgroup::\n"
done
else
echo "$LOG_DIR not found"
fi
- name: Upload logs
if: always()
uses: actions/upload-artifact@v4
# defaults to 'warn' on failure
with:
name: charm-logs${{ (inputs.charm-path && inputs.charm-path != '.') && format('-{0}', inputs.charm-path) || '' }}-${{ matrix.suite }}
include-hidden-files: true
# we assume that log_path is never going to be an empty string; but it may well be a non-existing directory.
path: ${{ steps.get_log_path.outputs.log_path }}
11 changes: 11 additions & 0 deletions .github/workflows/charm-pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,16 @@ on:
default: '.'
required: false
type: string
log-path:
type: string
description: |
Path to a directory where the .txt log files for an integration testing run will be stored.
Relative and absolute file paths are both allowed.
Relative paths are resolved relative to `charm-path`.
Paths that begin with a wildcard character should be quoted to avoid being
interpreted as YAML aliases.
required: false
default: .logs
provider:
description: "The provider to choose for either machine or k8s tests ('machine', 'microk8s', or 'k8s')"
default: 'k8s'
Expand Down Expand Up @@ -128,6 +138,7 @@ jobs:
secrets: inherit
with:
charm-path: ${{ inputs.charm-path }}
log-path: ${{ inputs.log-path }}
provider: ${{ inputs.provider }}
charmcraft-channel: ${{ inputs.charmcraft-channel }}
juju-channel: ${{ inputs.juju-channel }}
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -60,9 +60,11 @@ block-beta
qualitychecksslow["<b>Quality Checks (integration)</b>"]
pack["Pack the charm"]
integration["Integration tests"]
displaylogs["Display logs"]
uploadlogs["Upload logs zip file"]
integration --> displaylogs --> uploadlogs
end


block
columns 1
release["<b>Release Charm (per arch)</b>"]
Expand Down
Loading