Skip to content

Commit

Permalink
Fix sonarcloud (#39)
Browse files Browse the repository at this point in the history
  • Loading branch information
fschuch authored May 24, 2024
1 parent 713221e commit 7fb58f4
Show file tree
Hide file tree
Showing 5 changed files with 13 additions and 15 deletions.
14 changes: 7 additions & 7 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,13 @@ concurrency:
jobs:
test:
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12"]
exclude:
- os: macos-latest
python-version: "3.8"
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v4
Expand Down Expand Up @@ -63,8 +67,10 @@ jobs:
merge-multiple: true
- name: Set project version
run: |
REF=${{ github.ref }}
if [[ "${{ github.ref_type }}" == "tag" ]]; then
echo "sonar.projectVersion=${{ github.ref }}" >> sonar-project.properties
TAG_NAME=${REF#refs/tags/}
echo "sonar.projectVersion=$TAG_NAME" >> sonar-project.properties
fi
- name: SonarCloud Scan
uses: SonarSource/sonarcloud-github-action@master
Expand Down Expand Up @@ -116,9 +122,3 @@ jobs:

- name: Publish package distributions to PyPI
uses: pypa/gh-action-pypi-publish@release/v1

- uses: ncipollo/release-action@v1
with:
draft: true
skipIfReleaseExists: true
generateReleaseNotes: true
1 change: 0 additions & 1 deletion docs/_config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,6 @@ html:
launch_buttons:
notebook_interface: "jupyterlab"
binderhub_url: "https://mybinder.org"
colab_url: "https://colab.research.google.com"

sphinx:
extra_extensions:
Expand Down
7 changes: 2 additions & 5 deletions hatch.toml
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ check = "pre-commit run {args} --all-files"
type = "check mypy {args}"
lint = "check ruff {args}"
format = "check ruff-format {args}"
test = "pytest --cov --cov-report=term {args}"
test = "pytest --cov --cov-report=term --cov=xcompact3d_toolbox --cov=tests {args}"
test-no-cov = "test --no-cov {args}"
qa = ["check", "test", "echo '✅ QA passed'"]

Expand Down Expand Up @@ -61,6 +61,7 @@ serve = ["config", "sphinx-autobuild docs build/_build/html --ignore='**/data/*'

[envs.changelog]
description = "Changelog handler"
detached = true
dependencies = ["towncrier"]

[envs.changelog.scripts]
Expand All @@ -71,7 +72,3 @@ check = "towncrier check {args}"

[envs.hatch-static-analysis]
config-path = "ruff_defaults.toml"

[dirs.env]
virtual = ".venv"
pip-compile = ".venv"
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -61,7 +61,7 @@ minversion = "8.0"
branch = true
relative_files = true
source = ["xcompact3d_toolbox", "tests"]
omit = ["xcompact3d_toolbox/_version.py"]
omit = ["xcompact3d_toolbox/_version.py", "**/__init__.py"]

[tool.coverage.report]
show_missing = true
Expand Down
4 changes: 3 additions & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
sonar.organization=fschuch
sonar.projectKey=fschuch_xcompact3d_toolbox

sonar.python.version=3.8, 3.9, 3.10, 3.11, 3.12
sonar.sources=xcompact3d_toolbox
sonar.tests=tests
sonar.python.coverage.reportPaths=coverage.*.xml

0 comments on commit 7fb58f4

Please sign in to comment.