Adding upstream version 1.1.0.
Signed-off-by: Daniel Baumann <daniel@debian.org>
This commit is contained in:
parent
f13b7abbd8
commit
77504588ab
196 changed files with 10121 additions and 3780 deletions
44
.github/workflows/sonar.yml
vendored
Normal file
44
.github/workflows/sonar.yml
vendored
Normal file
|
@ -0,0 +1,44 @@
|
|||
---
|
||||
name: Analysis with Sonarlint and publish to SonarCloud
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
# Need to do this to be able to have coverage on PR across forks.
|
||||
pull_request_target:
|
||||
|
||||
# TODO this can be made better by running only coverage, it happens that today
|
||||
# in tox gh-actions we have configured 3.11 to run the report side in
|
||||
# pyproject.toml
|
||||
|
||||
jobs:
|
||||
sonarcloud:
|
||||
name: Run Sonarlint analysis and upload to SonarCloud.
|
||||
if: github.repository == 'aristanetworks/anta'
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
with:
|
||||
ref: ${{ github.event.pull_request.head.sha }}
|
||||
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
|
||||
- name: Setup Python
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: 3.11
|
||||
- name: Install dependencies
|
||||
run: pip install tox tox-gh-actions
|
||||
- name: "Run pytest via tox for ${{ matrix.python }}"
|
||||
run: tox
|
||||
- name: SonarCloud Scan
|
||||
uses: SonarSource/sonarcloud-github-action@master
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
|
||||
with:
|
||||
# Using ACTION_STEP_DEBUG to trigger verbose when debugging in Github Action
|
||||
args: >
|
||||
-Dsonar.scm.revision=${{ github.event.pull_request.head.sha }}
|
||||
-Dsonar.pullrequest.key=${{ github.event.number }}
|
||||
-Dsonar.pullrequest.branch=${{ github.event.pull_request.head.ref }}
|
||||
-Dsonar.pullrequest.base=${{ github.event.pull_request.base.ref }}
|
||||
-Dsonar.verbose=${{ secrets.ACTIONS_STEP_DEBUG }}
|
Loading…
Add table
Add a link
Reference in a new issue