Skip to content

added github actions #2

added github actions

added github actions #2

Workflow file for this run

name: Sonar Scanner
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
sonarcloud:
name: SonarCloud
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.13"]
steps:
- uses: actions/checkout@v3
with:
fetch-depth: 0 # Shallow clones should be disabled for a better relevancy of analysis
- name: Install uv
uses: astral-sh/setup-uv@v6
with:

Check failure on line 22 in .github/workflows/sonar-scan.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/sonar-scan.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
python-version: ${{ matrix.python-version }}
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Install dependencies and run coverag
run: |
uv run coverage run --source=src/ngl -m pytest -v tests && uv run coverage report -m
uv run coverage xml
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # Needed to get PR information, if any
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}