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

Code Coverage for Sonarcloud #453

Merged
merged 2 commits into from
Jul 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
20 changes: 0 additions & 20 deletions .github/workflows/build.yml

This file was deleted.

20 changes: 12 additions & 8 deletions .github/workflows/integrate.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,8 @@ on:
push:
branches:
- "*.*.x"
pull_request: null
pull_request:
types: [opened, synchronize, reopened]

jobs:
byte_level:
Expand Down Expand Up @@ -70,6 +71,8 @@ jobs:

- name: "Checkout code"
uses: "actions/[email protected]"
with:
fetch-depth: 0

- name: "Install dependencies"
uses: "ramsey/composer-install@v2"
Expand All @@ -83,13 +86,14 @@ jobs:
- name: "Execute tests (JS)"
run: "make js"

# - name: Send coverage to Coveralls
# if: "matrix.php-version == '8.1' && matrix.dependencies == 'highest'"
# env:
# COVERALLS_REPO_TOKEN: "${{ secrets.GITHUB_TOKEN }}"
# run: |
# wget "https://github.com/php-coveralls/php-coveralls/releases/download/v2.5.2/php-coveralls.phar"
# php ./php-coveralls.phar -v
- name: "Fix code coverage paths"
run: sed -i 's@'$GITHUB_WORKSPACE'@/github/workspace/@g' coverage.xml

- name: "SonarCloud Scan"
uses: "sonarsource/sonarcloud-github-action@master"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}

static_analysis:
name: "3️⃣ Static Analysis"
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -40,7 +40,7 @@ ci-mu: vendor ## Mutation tests (for CI/CD only)

.PHONY: ci-cc
ci-cc: vendor ## Show test coverage rates (for CI/CD only)
vendor/bin/phpunit --coverage-text
XDEBUG_MODE=coverage vendor/bin/phpunit --coverage-text --coverage-clover=coverage.xml

.PHONY: ci-cs
ci-cs: vendor ## Check all files using defined ECS rules (for CI/CD only)
Expand Down
1 change: 1 addition & 0 deletions sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
sonar.organization=web-auth
sonar.projectKey=web-auth_webauthn-framework
sonar.php.coverage.reportPaths=coverage.xml
sonar.sources=.