Skip to content

canonical/certification-github-workflows

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

30 Commits
 
 
 
 
 
 
 
 

Repository files navigation

certification-github-workflows

This repository is the home to reusable GitHub workflows and composite actions useful across the different pieces of the Certification ops stack.

  • .github/actions/microk8s-setup: Sets up a juju managed microk8s cluster in a ready-to-be-tested state, with docker.io image registry mirroring configured for Canonical self-hosted runners in mind.
  • .github/actions/archive-charm-testing-artifacts: Archives a charm build, logs and juju crashdump output in case of a failed run.

Usage examples

k8s charm integration testing

Taking [github.com/canonical/test_observer] as an example, integration tests for the frontend charm under ./frontend/charm can be constructed using the actions microk8s-setup and archive-charm-testing-artifacts as follows:

jobs:
  integration-test:
    permissions:
      contents: read
      packages: read

    name: Integration tests
    runs-on: [self-hosted, jammy, xlarge]

    steps:
      - name: Checkout
        uses: actions/checkout@v4

      - name: Set up microk8s
        uses: canonical/certification-github-workflows/.github/actions/microk8s-setup

      - name: Run integration tests
        run: tox -e integration

      - name: Archive charm testing outputs
        uses: canonical/certification-github-workflows/.github/actions/archive-charm-testing-artifacts

    defaults:
      run:
        working-directory: ./frontend/charm

In case of a success, job artifacts include the charm that was built, as well as charmcraft and juju logs.

In case of a failure, you will find in addition also output from juju-crashdump.

About

Reusable CI workflows and composite actions for hardware certification related projects

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published