-
Notifications
You must be signed in to change notification settings - Fork 12
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
3 additions
and
172 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,179 +8,10 @@ on: | |
required: true | ||
|
||
jobs: | ||
lib-check: | ||
name: Check libraries | ||
strategy: | ||
matrix: | ||
charm: | ||
- kfp-api | ||
- kfp-metadata-writer | ||
- kfp-persistence | ||
- kfp-profile-controller | ||
- kfp-schedwf | ||
- kfp-ui | ||
- kfp-viewer | ||
- kfp-viz | ||
uses: canonical/charmed-kubeflow-workflows/.github/workflows/_quality-checks.yaml@main | ||
secrets: inherit | ||
with: | ||
charm-path: ./charms/${{ matrix.charm }} | ||
|
||
lint: | ||
name: Lint | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
charm: | ||
- kfp-api | ||
- kfp-metadata-writer | ||
- kfp-persistence | ||
- kfp-profile-controller | ||
- kfp-schedwf | ||
- kfp-ui | ||
- kfp-viewer | ||
- kfp-viz | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: python3 -m pip install tox | ||
- run: tox -e ${{ matrix.charm }}-lint | ||
|
||
unit: | ||
name: Unit tests | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
charm: | ||
- kfp-api | ||
- kfp-metadata-writer | ||
- kfp-persistence | ||
- kfp-profile-controller | ||
- kfp-schedwf | ||
- kfp-ui | ||
- kfp-viewer | ||
- kfp-viz | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- run: python3 -m pip install tox | ||
- run: tox -e ${{ matrix.charm }}-unit | ||
|
||
terraform-checks: | ||
name: Terraform | ||
uses: canonical/charmed-kubeflow-workflows/.github/workflows/terraform-checks.yaml@main | ||
strategy: | ||
matrix: | ||
charm: | ||
- kfp-api | ||
- kfp-metadata-writer | ||
- kfp-persistence | ||
- kfp-profile-controller | ||
- kfp-schedwf | ||
- kfp-ui | ||
- kfp-viewer | ||
- kfp-viz | ||
with: | ||
charm-path: ./charms/${{ matrix.charm }} | ||
# The namespace is hardcoded in the upstream project | ||
# So the model's name must be kubeflow | ||
# See: https://github.com/kubeflow/kubeflow/issues/6136 | ||
model: kubeflow | ||
|
||
integration: | ||
name: Integration tests (microk8s) | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
charm: | ||
- kfp-persistence | ||
- kfp-profile-controller | ||
- kfp-api | ||
- kfp-schedwf | ||
- kfp-viewer | ||
- kfp-ui | ||
- kfp-metadata-writer | ||
- kfp-viz | ||
steps: | ||
# Ideally we'd use self-hosted runners, but this effort is still not stable | ||
# This action will remove unused software (dotnet, haskell, android libs, codeql, | ||
# and docker images) from the GH runner. | ||
# This leaves ~45GB free as of 2024-04-10, but this amount has varied as GH changed their | ||
# runners | ||
- name: Maximise GH runner space | ||
uses: jlumbroso/[email protected] | ||
|
||
- uses: actions/checkout@v3 | ||
|
||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: microk8s | ||
channel: 1.31-strict/stable | ||
juju-channel: 3.6/stable | ||
# Pinned to 3.x/stable due to https://github.com/canonical/charmcraft/issues/1845 | ||
charmcraft-channel: 3.x/stable | ||
|
||
- name: Integration tests | ||
run: | | ||
# Requires the model to be called kubeflow due to | ||
# https://github.com/canonical/kfp-operators/issues/389 | ||
juju add-model kubeflow | ||
sg snap_microk8s -c "tox -e ${{ matrix.charm }}-integration -- --model kubeflow" | ||
- name: Collect charm debug artifacts | ||
uses: canonical/kubeflow-ci/actions/dump-charm-debug-artifacts@main | ||
if: always() | ||
|
||
test-bundle: | ||
name: Test the bundle | ||
runs-on: ubuntu-20.04 | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
sdk: | ||
- v1 | ||
- v2 | ||
steps: | ||
# This is a workaround for https://github.com/canonical/kfp-operators/issues/250 | ||
# Ideally we'd use self-hosted runners, but this effort is still not stable | ||
# This action will remove unused software (dotnet, haskell, android libs, codeql, | ||
# and docker images) from the GH runner. | ||
# This leaves ~45GB free as of 2024-04-10, but this amount has varied as GH changed their | ||
# runners | ||
- name: Maximise GH runner space | ||
uses: jlumbroso/[email protected] | ||
|
||
- name: Check out code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup operator environment | ||
uses: charmed-kubernetes/actions-operator@main | ||
with: | ||
provider: microk8s | ||
channel: 1.31-strict/stable | ||
juju-channel: 3.6/stable | ||
# Pinned to 3.x/stable due to https://github.com/canonical/charmcraft/issues/1845 | ||
charmcraft-channel: 3.x/stable | ||
microk8s-addons: "dns hostpath-storage rbac metallb:10.64.140.43-10.64.140.49" | ||
|
||
- name: Run test | ||
run: | | ||
# Requires the model to be called kubeflow due to kfp-viewer | ||
juju add-model kubeflow | ||
sg snap_microk8s -c "tox -e bundle-integration-${{ matrix.sdk }} -- --model kubeflow --bundle=./tests/integration/bundles/kfp_latest_edge.yaml.j2" --charmcraft-clean | ||
- name: Get all | ||
run: kubectl get all -A | ||
if: failure() | ||
|
||
- name: Get juju status | ||
run: juju status | ||
if: failure() | ||
|
||
# Collect debug artefacts only on failure || cancelled as the CI for this repository | ||
# in particular struggles with storage limitations. | ||
- name: Collect charm debug artifacts | ||
uses: canonical/kubeflow-ci/actions/dump-charm-debug-artifacts@main | ||
if: failure() || cancelled() | ||
- uses: actions/checkout@v4 | ||
- name: Setup tmate session | ||
uses: mxschmitt/action-tmate@v3 |