-
Notifications
You must be signed in to change notification settings - Fork 929
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
Add workflow to run e2e tests from lxd-ui #14035
base: main
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Hi @edlerd please can you work with @simondeziel to update this to use the pre-built LXD binaries we now have (that are compiled during the Code Tests phase) and to use the re-usable workflows for performance tuning and dependency installation.
Also i'd like to avoid building the docs twice, but they are built into the tarball i believe during the Code Tests phase so may be available already now.
6f77ba3
to
df58339
Compare
@simondeziel @tomponline Updated the workflow to consume the build artefacts from previous steps. Please give it another review. |
Also using the docs artefact by depending and downloading on that build step. |
df58339
to
cb3f958
Compare
## Done - chore(ci) simplify tests to not rely on workflow image download Related to canonical/lxd#14035
3aec02a
to
8b4b9b8
Compare
b1bfcad
to
f83f2bc
Compare
f83f2bc
to
58ba9f6
Compare
Please can this be rebased and squashed into fewer commits (perhaps only 1, depending on what you see as the logical changes in this PR), rather than each commit showing the evolution of the PR over the review. Thanks |
Will do this after testing this on a fork shows a successful run. |
CI=true DISABLE_VM_TESTS=true LXD_DIR=/var/lib/lxd PATH=/home/runner/go/bin:$PATH npx playwright test --project chromium:lxd-latest-edge | ||
#npx playwright test --project chromium:lxd-5.21-edge | ||
#npx playwright test --project lxd-5.0-edge | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
We should probably have a step here to cleanly stop LXD via lxd shutdown
so we can be sure all coverage data is written before sending it up.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I added the lxd shutdown
, but the coverage data for the ui is empty on this run on my fork. I set up the secrets over there and the e2e test suite completed just fine. Any idea what could be missing is welcome.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Here is an updated run on my fork. It still reports no coverage though.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the GOCOVERDIR env var isn't being set in your fork's run because of this line
lxd/.github/workflows/tests.yml
Line 15 in 5fdd983
GOCOVERDIR: ${{ ( github.event_name == 'workflow_dispatch' || github.event_name == 'schedule' ) && '/home/runner/work/lxd/lxd/coverage' || '' }} |
Because its that env var that indicates to the lxd binary where to store the coverage files.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I wonder if the GOCOVERDIR env var isn't being set in your fork's run because of this line
Yeah, I saw that and explicitly set GOCOVERDIR
for the ui step in recent versions of the workflow.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
ah, ok, but was that env var present in the lxd build step too, as that is used by LXD's makefile to build lxd with go coverage support.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
lxd/.github/workflows/tests.yml
Line 122 in 5fdd983
make |
58ba9f6
to
5fdd983
Compare
eb9d734
to
eae5054
Compare
Signed-off-by: David Edler <[email protected]>
eae5054
to
97b72a4
Compare
Added a step to the GitHub test workflow, executing the e2e test suite from lxd-ui with a lxd backend built from the current branch from a PR or main branch.
We might extend this on the stable-5.21 and stable-5.0 branches, as we have dedicated test suites in lxd-ui for those. For older versions, we should continue skipping the e2e tests. I'd keep this as a second step in a followup PR.
This was successful on a fork, i.e. see this run.