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

CI: Move to Github Actions for Sonar to get coverage #5062

Merged
merged 5 commits into from
Feb 19, 2025

Conversation

gmuloc
Copy link
Contributor

@gmuloc gmuloc commented Feb 19, 2025

Change Summary

cf title

Component(s) name

ci

Proposed changes

We are using automatic analysis from sonarcloud today but this does not support coverage:
https://docs.sonarsource.com/sonarqube-cloud/enriching/test-coverage/overview/

So we need to use CI-based.

Before merging this PR we should:

  • disable automatic analysis on Sonar
  • add Sonar secret to the repo

How to test

Sadly we need to merge first ...

Checklist

Repository Checklist

  • My code has been rebased from devel before I start
  • I have read the CONTRIBUTING document.
  • My change requires a change to the documentation and documentation have been updated accordingly.
  • I have updated molecule CI testing accordingly. (check the box if not applicable)

@gmuloc gmuloc requested review from a team as code owners February 19, 2025 09:55
Copy link

Review docs on Read the Docs

To test this pull request:

# Create virtual environment for this testing below the current directory
python -m venv test-avd-pr-5062
# Activate the virtual environment
source test-avd-pr-5062/bin/activate
# Install all requirements including PyAVD
pip install "pyavd[ansible] @ git+https://github.com/gmuloc/avd.git@sonar-coverage-baby#subdirectory=python-avd" --force
# Point Ansible collections path to the Python virtual environment
export ANSIBLE_COLLECTIONS_PATH=$VIRTUAL_ENV/ansible_collections
# Install Ansible collection
ansible-galaxy collection install git+https://github.com/gmuloc/avd.git#/ansible_collections/arista/avd/,sonar-coverage-baby --force
# Optional: Install AVD examples
cd test-avd-pr-5062
ansible-playbook arista.avd.install_examples

@github-actions github-actions bot added the type: code quality CI and development toolset label Feb 19, 2025
@gmuloc
Copy link
Contributor Author

gmuloc commented Feb 19, 2025

@ClausHolbechArista reviewed the config file offline - merging to test

@gmuloc gmuloc merged commit ceb90d9 into aristanetworks:devel Feb 19, 2025
46 checks passed
@gmuloc gmuloc mentioned this pull request Feb 19, 2025
4 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
rn: CI type: code quality CI and development toolset
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant