Skip to content
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

Implement fully automated end-to-end CI testing workflow #70

Merged
merged 113 commits into from
Jun 21, 2023

Conversation

weiiwang01
Copy link
Collaborator

@weiiwang01 weiiwang01 commented Jun 15, 2023

Updated the github-runner charm to include a new 'test mode'. This functionality facilitates the charm's deployment on an LXD container cloud, using LXD nesting. Building upon this 'test mode', we have also developed a new e2e test that is fully automated, and operable on GitHub hosted runners. This also resolves the bootstrap problem that we had encountered with our previous e2e test configuration, which requires a self-hosted runner to test self-hosted runner.

@weiiwang01 weiiwang01 changed the title WIP - DO NOT MERGE Implement fully automated end-to-end CI testing workflow Jun 19, 2023
@weiiwang01 weiiwang01 marked this pull request as ready for review June 19, 2023 11:47
@weiiwang01 weiiwang01 requested a review from a team as a code owner June 19, 2023 11:47
Copy link

@gregory-schiano gregory-schiano left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not a big big fan of the "test-mode" config parameter just for the E2E tests, but to be honest couldn't think about an good alternative for now

.github/workflows/e2e_test.yaml Show resolved Hide resolved
.gitignore Outdated Show resolved Hide resolved
src/lxd.py Outdated Show resolved Hide resolved
jdkandersson
jdkandersson previously approved these changes Jun 20, 2023
yhaliaw
yhaliaw previously approved these changes Jun 21, 2023
@github-actions
Copy link
Contributor

Test coverage for ccd3aff

Name                                    Stmts   Miss Branch BrPart  Cover   Missing
-----------------------------------------------------------------------------------
src/charm.py                              314     58     68     14    80%   127-129, 260-270, 286-288, 297-298, 305, 316, 327->344, 332-337, 354-355, 359-360, 365-368, 384-385, 419-427, 457-459, 462->exit, 466-468, 491-496, 506-507, 509-510, 512-513, 590-591, 601
src/errors.py                              18      0      0      0   100%
src/event_timer.py                         42      8      4      0    74%   96-99, 119-122
src/github_type.py                         36      0      0      0   100%
src/lxd_type.py                            34      0      2      0   100%
src/repo_policy_compliance_service.py       5      5      0      0     0%   4-14
src/runner.py                             215     37     58     19    79%   39->43, 143-151, 162-163, 170-177, 183-189, 244-249, 254, 291-293, 300, 314, 324, 328, 330, 345, 379-384, 394, 478, 511, 537, 542-554, 568, 586
src/runner_manager.py                     196     20     80      8    88%   202-203, 217-223, 227-229, 239-240, 293, 317-321, 340, 358, 472, 492
src/runner_type.py                         46      0     10      0   100%
src/utilities.py                           55      2     12      4    91%   74->76, 78->84, 89-91
-----------------------------------------------------------------------------------
TOTAL                                     961    130    234     45    84%

Static code analysis report

Run started:2023-06-21 05:48:52.061899

Test results:
  No issues identified.

Code scanned:
  Total lines of code: 2082
  Total lines skipped (#nosec): 0
  Total potential issues skipped due to specifically being disabled (e.g., #nosec BXXX): 9

Run metrics:
  Total issues (by severity):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
  Total issues (by confidence):
  	Undefined: 0
  	Low: 0
  	Medium: 0
  	High: 0
Files skipped (0):

@weiiwang01 weiiwang01 requested a review from yhaliaw June 21, 2023 06:47
@weiiwang01 weiiwang01 merged commit c5b8557 into main Jun 21, 2023
14 checks passed
@weiiwang01 weiiwang01 deleted the feat-auto-e2e branch June 21, 2023 09:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants