diff --git a/.github/workflows/pypi.yml b/.github/workflows/pypi.yml index 0cf21c7..f509410 100644 --- a/.github/workflows/pypi.yml +++ b/.github/workflows/pypi.yml @@ -20,6 +20,7 @@ jobs: - name: Install dependencies run: | poetry install + poetry add twine - name: Build and publish env: diff --git a/.github/workflows/sonar.yml b/.github/workflows/sonar.yml index 6233709..1138f2b 100644 --- a/.github/workflows/sonar.yml +++ b/.github/workflows/sonar.yml @@ -18,9 +18,9 @@ jobs: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v3 - with: - fetch-depth: 0 + - uses: actions/checkout@v3 + with: + fetch-depth: 0 - uses: actions/setup-python@v4 with: @@ -33,20 +33,20 @@ jobs: run: | poetry install --with test - - name: Run tests - run: | - pytest --cov=estimenergy --cov-report=xml - - - name: SonarCloud Scan - uses: sonarsource/sonarcloud-github-action@master - env: - GITHUB_TOKEN: ${{ secrets.PAT }} - SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} - with: - args: > - -Dsonar.organization=${{ env.SONAR_PROJECT_ORGANIZATION }} - -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} - -Dsonar.python.coverage.reportPaths=coverage.xml - -Dsonar.sources=estimenergy,custom_components/estimenergy - -Dsonar.tests=tests/ - -Dsonar.python.version=3.9 + - name: Run tests + run: | + pytest --cov=estimenergy --cov-report=xml + + - name: SonarCloud Scan + uses: sonarsource/sonarcloud-github-action@master + env: + GITHUB_TOKEN: ${{ secrets.PAT }} + SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }} + with: + args: > + -Dsonar.organization=${{ env.SONAR_PROJECT_ORGANIZATION }} + -Dsonar.projectKey=${{ env.SONAR_PROJECT_KEY }} + -Dsonar.python.coverage.reportPaths=coverage.xml + -Dsonar.sources=estimenergy,custom_components/estimenergy + -Dsonar.tests=tests/ + -Dsonar.python.version=3.9