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

tests: udpate the github workflow to run tests suggested by spread-filter tool #14519

Merged

Conversation

sergiocazzolato
Copy link
Collaborator

@sergiocazzolato sergiocazzolato commented Sep 18, 2024

Through this change we will run the tests suggested by the spread-filter tool following the rules located in tests/lib/spread/rules which defined for each system.

For nested tests, this ruleset will make sure that: . Always that the nested.sh lib or the assertions dir are updated, all the nested test are executed
. When an specific nested test is added/updated, then this is executed
. If the "Run Nested" label is added to the PR, all the nested tests will be executed as well.
. In master branch, all nested test are executed
. In other scenarios, nested tests are not executed.

Also, in master branch, all the tests are executed (the tests defined in the matrix for each system).

@pedronis
Copy link
Collaborator

When an specific nested test is updated, then this is executed

does that also include added?

Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

One question about shell syntax.

.github/workflows/test.yaml Outdated Show resolved Hide resolved
@sergiocazzolato
Copy link
Collaborator Author

@pedronis, yes, any change "add/update" is considered

Already updated the description.

Copy link

codecov bot commented Oct 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 79.02%. Comparing base (96ea7b0) to head (c99a28e).
Report is 72 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff             @@
##           master   #14519      +/-   ##
==========================================
+ Coverage   78.95%   79.02%   +0.07%     
==========================================
  Files        1084     1087       +3     
  Lines      146638   147628     +990     
==========================================
+ Hits       115773   116667     +894     
- Misses      23667    23731      +64     
- Partials     7198     7230      +32     
Flag Coverage Δ
unittests 79.02% <ø> (+0.07%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@sergiocazzolato sergiocazzolato requested review from maykathm and pedronis and removed request for pedronis November 12, 2024 16:23
Copy link
Contributor

@zyga zyga left a comment

Choose a reason for hiding this comment

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

This looks fine to me. Thanks!

Copy link
Contributor

@maykathm maykathm left a comment

Choose a reason for hiding this comment

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

thanks

Copy link
Contributor

@bboozzoo bboozzoo left a comment

Choose a reason for hiding this comment

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

LGTM

.github/workflows/test.yaml Outdated Show resolved Hide resolved
…lter tool

Through this change we will run the tests suggested by the spread-filter
tool following the rules located in tests/lib/spread/rules which defined
for each system.

For nested tests, this ruleset will make sure that:
. Always that the nested.sh lib or the assertions dir are updated, all
the nested test are executed
 . When an specific nested test is updated, then this is executed
. If the "Run Nested" label is added to the PR, all the nested tests
will be executed as well.
 . In master branch, all nested test are executed
 . In other scenarios, nested tests are not executed.

Also, in master branch, all the tests are executed (the tests defined in
the matrix for each system).
This produced issues for example running all the nested tests when it is
not needed.
@sergiocazzolato sergiocazzolato merged commit 09fcec0 into canonical:master Nov 14, 2024
53 of 57 checks passed
@sergiocazzolato sergiocazzolato deleted the tests-run-targeted-tests branch November 14, 2024 20:43
sespiros added a commit to sespiros/snapd that referenced this pull request Nov 19, 2024
* master: (44 commits)
  wrappers: do not reload activation units (canonical#14724)
  gadget/install: support for no{exec,dev,suid} mount flags
  interfaces/builtin/mount_control: add support for nfs mounts (canonical#14694)
  tests: use gojq - part 1 (canonical#14686)
  interfaces/desktop-legacy: allow DBus access to com.canonical.dbusmenu
  interfaces/builtin/fwupd.go: allow access to nvmem for thunderbolt plugin
  tests: removing uc16 executions (canonical#14575)
  tests: Added arm github runner to build snapd (canonical#14504)
  tests: no need to run spread when there are not tests matching the filter (canonical#14728)
  tests/lib/tools/store-state: exit on errors, update relevant tests (canonical#14725)
  tests: udpate the github workflow to run tests suggested by spread-filter tool (canonical#14519)
  testtime: add mockable timers for use in tests (canonical#14672)
  interface/screen_inhibit_control: Improve screen inhibit control for use on core (canonical#14134)
  tests: use images with 20G disk in openstack (canonical#14720)
  i/builtin: allow @ in custom-device filepaths (canonical#14651)
  tests: refactor test-snapd-desktop-layout-with-content
  tests: fix broken app definition
  tests: capitalize sentences in comments
  tests: wrap very long shell line
  tests: fix raciness in async startup and sync install
  ...
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