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: run tests on master branch nightly #15084

Open
wants to merge 2 commits into
base: master
Choose a base branch
from

Conversation

sergiocazzolato
Copy link
Collaborator

This change runs the tests using master branch nightly instead of after a change is pushed to master.

We do that in order to reduce the amount of instances used in google.

Also the nightly job was renamed to nightly-static-analysis which is a more representative name.

This change runs the tests using master branch nightly instead of after
a change is pushed to master.

We do that in order to reduce the amount of instances used in google.

Also the nightly job was renamed to nightly-static-analysis which is a
more representative name.
@sergiocazzolato sergiocazzolato added the Simple 😃 A small PR which can be reviewed quickly label Feb 14, 2025
systems: 'ALL'
tasks: 'tests/...'
rules: ''
use-snapd-snap-from-master: true
Copy link
Contributor

Choose a reason for hiding this comment

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

Don't we want to run all tests except for openstack? So not only the google backend, but also nested, arm, pro, and google-distro-*?

Copy link
Contributor

Choose a reason for hiding this comment

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

If we want to effectively move the same thing from master to here, we could read the json files for fundamental and non-fundamental and run spread on those

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

right, I just implemented what you suggested. Thanks for the review.

Copy link

github-actions bot commented Feb 14, 2025

Wed Feb 19 09:42:41 UTC 2025
The following results are from: https://github.com/canonical/snapd/actions/runs/13397182287

Failures:

Preparing:

  • openstack:centos-9-64:tests/main/snap-run-inhibition-flow

Executing:

  • google-distro-2:arch-linux-64:tests/main/interfaces-network-status-classic
  • openstack:debian-12-64:tests/main/progress
  • google-arm:ubuntu-core-22-arm-64:tests/core/gadget-update-pc
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups:kmsg
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups-required-or-optional
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups-self-manage
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups-strict-enforced
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups-serial-port
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups:uinput
  • google:ubuntu-25.04-64:tests/main/lxd-try
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups-helper
  • google:ubuntu-25.04-64:tests/main/cgroup-devices-v2

Restoring:

  • openstack:debian-sid-64:tests/unit/
  • openstack:debian-12-64:tests/smoke/
  • openstack:debian-12-64:tests/smoke/
  • google-arm:ubuntu-core-22-arm-64:tests/core/gadget-update-pc
  • google-arm:ubuntu-core-22-arm-64:tests/core/
  • google-arm:ubuntu-core-22-arm-64
  • google:ubuntu-25.04-64:tests/main/security-device-cgroups-strict-enforced

This is because there are several google-* backends and doing this we
simplify the workflow configuration
Copy link

codecov bot commented Feb 18, 2025

Codecov Report

All modified and coverable lines are covered by tests ✅

Please upload report for BASE (master@c4ff9e7). Learn more about missing BASE report.
Report is 236 commits behind head on master.

Additional details and impacted files
@@            Coverage Diff            @@
##             master   #15084   +/-   ##
=========================================
  Coverage          ?   78.06%           
=========================================
  Files             ?     1185           
  Lines             ?   157793           
  Branches          ?        0           
=========================================
  Hits              ?   123184           
  Misses            ?    26958           
  Partials          ?     7651           
Flag Coverage Δ
unittests 78.06% <ø> (?)

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.

Copy link
Collaborator

@ernestl ernestl 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

@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.

I didn't think to mention that we no longer have the nested systems in the fundamental/non-fundamental divide so they have to be explicitly added. Sorry about that. I think that we can actually make things more compact anyway and have only one spread job (since there's no need to divide out the systems). Here's my suggestion:

  read-systems:
    runs-on: ubuntu-latest
    outputs:
      systems: ${{ steps.read-systems.outputs.systems }}
    steps:
      - name: Checkout code
        uses: actions/checkout@v4

      - name: Read matrix file
        id: read-systems
        shell: bash
        run: |
          fund="$(jq -c . ./.github/workflows/fundamental-systems.json)"
          nonfund="$(jq -c . ./.github/workflows/non-fundamental-systems.json)"
          all=$(echo "$fund $nonfund" | jq -s '[.[0].include, .[1].include] | flatten | {include: .}')
          ubuntu18='{"group":"nested-ubuntu-18.04","backend":"google-nested","systems":"ubuntu-18.04-64","tasks":"tests/nested/...","rules":"nested"}'
          ubuntu20='{"group":"nested-ubuntu-20.04","backend":"google-nested","systems":"ubuntu-20.04-64","tasks":"tests/nested/...","rules":"nested"}'
          ubuntu22='{"group":"nested-ubuntu-22.04","backend":"google-nested","systems":"ubuntu-22.04-64","tasks":"tests/nested/...","rules":"nested"}'
          ubuntu24='{"group":"nested-ubuntu-24.04","backend":"google-nested","systems":"ubuntu-24.04-64","tasks":"tests/nested/...","rules":"nested"}'
          all=$(echo "$all $ubuntu18 $ubuntu20 $ubuntu22 $ubuntu24" | jq -s '.[0] * { include: (.[0].include + [.[1], .[2], .[3], .[4]]) }')
          echo "systems=$(echo $all | jq -c)" >> $GITHUB_ENV

Since it's a single output, then we would only need a single spread job to follow.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Simple 😃 A small PR which can be reviewed quickly
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants