-
Notifications
You must be signed in to change notification settings - Fork 12
Frontend charm integration tests fix with a self hosted runner #54
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Changes from all commits
0d44757
97e8d4c
a055701
672ea62
6c11eb5
5c149e2
11cf30b
6e8375a
97f1531
1478f45
b03e015
55b9436
cde6b80
1ed9d5f
0a30cee
bf2859c
2fc065f
06a258e
4af3b2a
0db5736
8417af7
a3a5404
e90849c
234b1aa
fd3ed35
63f4d6f
acf47ce
b03dddb
7348559
9521314
6a53221
bcd4cf5
08d8c5c
977550e
9f8ccec
422ee3b
4068f04
1b1e212
b0b420d
fb4817a
5a75762
4f5cc55
188f2ba
418cdbd
ff57b22
61e6d4f
9e0ff27
943e0e6
acb0dd8
f9528e3
3ded998
5bcbd1c
ad2ae8b
09e1425
e465185
4814f96
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,45 +1,37 @@ | ||
| name: Run charm tests | ||
| name: Run charm integration tests | ||
| on: | ||
| pull_request_review: | ||
| on: | ||
| pull_request_review: | ||
| types: [submitted] | ||
| pull_request: | ||
| branches: | ||
| - '**' | ||
| paths: | ||
| - 'frontend/charm/**' | ||
| push: | ||
| branches: ["main"] | ||
| tags: ["v*.*.*"] | ||
| workflow_dispatch: | ||
|
|
||
| jobs: | ||
| integration-test: | ||
| permissions: | ||
| contents: read | ||
| packages: read | ||
|
|
||
| name: Integration tests | ||
| runs-on: [self-hosted, linux, large] | ||
| runs-on: [self-hosted, jammy, xlarge] | ||
| if: github.event.review.state == 'APPROVED' | ||
| steps: | ||
| - name: Checkout | ||
| uses: actions/checkout@v3 | ||
| - name: Setup LXD | ||
| uses: canonical/setup-lxd@main | ||
| with: | ||
| channel: 5.13/stable | ||
| - name: Setup operator environment | ||
| uses: charmed-kubernetes/actions-operator@main | ||
| with: | ||
| provider: microk8s | ||
| uses: actions/checkout@v4 | ||
| - name: Set up microk8s | ||
| uses: canonical/certification-github-workflows/.github/actions/microk8s-setup@main | ||
| - name: Run integration tests | ||
| run: tox -e integration | ||
| - name: Archive Tested Charm | ||
| uses: actions/upload-artifact@v3 | ||
| if: ${{ github.ref_name == 'main' }} | ||
| with: | ||
| name: tested-charm | ||
| path: .tox/**/test-observer-frontend_ubuntu-22.04-amd64.charm | ||
| retention-days: 5 | ||
| - name: Archive charmcraft logs | ||
| if: failure() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: charmcraft-logs | ||
| path: /home/runner/.local/state/charmcraft/log/*.log | ||
| - name: Archive juju crashdump | ||
| if: failure() | ||
| uses: actions/upload-artifact@v3 | ||
| with: | ||
| name: juju-crashdump | ||
| path: juju-crashdump-*.tar.xz | ||
| - name: Archive charm testing outputs | ||
| uses: canonical/certification-github-workflows/.github/actions/archive-charm-testing-artifacts@main | ||
| defaults: | ||
| run: | ||
| working-directory: ./frontend/charm | ||
| working-directory: ./frontend/charm |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,2 +1,2 @@ | ||
| ops >= 1.5.0 | ||
| ops >= 2.8.0 | ||
| requests==2.31.0 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1 +1,2 @@ | ||
| ops >= 2.2.0 | ||
| ops >= 2.8.0 | ||
| macaroonbakery==1.3.2 # workaround to failures such as https://github.com/canonical/test_observer/actions/runs/7142353669/job/19451476954 |
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -66,7 +66,7 @@ commands = | |
| description = Run integration tests | ||
| deps = | ||
| pytest | ||
| juju | ||
| juju<=3.2 | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is intentionally |
||
| pytest-operator | ||
| -r {tox_root}/requirements.txt | ||
| commands = | ||
|
|
||
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,7 +1,7 @@ | ||
| terraform { | ||
| required_providers { | ||
| juju = { | ||
| version = "~> 0.7.0" | ||
|
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. The changes below showed up as necessary when the provider was updated: the
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This change is not strictly speaking necessary for the charm integration tests (though it was my intention to also test out in succession also that the terraform plan continues to be able to spin a new environment up that stabilises in an all-ready state).
Contributor
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. can we do this on PS5 though? as in can we use tf provider for juju version
Contributor
Author
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think this should indeed Just Work, in that the next time you deploy using this plan, it will upgrade the provider to the latest version that is described here. Deploying to staging will confirm that safely, I'd say. |
||
| version = "~> 0.10.0" | ||
| source = "juju/juju" | ||
| } | ||
| } | ||
|
|
@@ -67,7 +67,6 @@ resource "juju_application" "pg" { | |
| charm { | ||
| name = "postgresql-k8s" | ||
| channel = "14/stable" | ||
| series = "jammy" | ||
| } | ||
| } | ||
|
|
||
|
|
@@ -78,7 +77,6 @@ resource "juju_application" "test-observer-api" { | |
| charm { | ||
| name = "test-observer-api" | ||
| channel = "latest/edge" | ||
| series = "jammy" | ||
| } | ||
|
|
||
| config = { | ||
|
|
@@ -97,7 +95,6 @@ resource "juju_application" "test-observer-frontend" { | |
| charm { | ||
| name = "test-observer-frontend" | ||
| channel = "latest/edge" | ||
| series = "jammy" | ||
| } | ||
|
|
||
| config = { | ||
|
|
||
Uh oh!
There was an error while loading. Please reload this page.