Skip to content

Commit e39c184

Browse files
Radoslaw Ziemniewiczclaude
andcommitted
Badges that work, and a place to send the coverage
Every README now carries the same set: tests, version, downloads, PHP version, StyleCI, license, and the services this repository is actually registered with. The SonarCloud ones were showing "Project not found" on twenty of them, because nothing had ever uploaded a measure — CI does that now, where the token is set. The repository description and topics come from what composer.json already says the package is for, so the two cannot drift apart. Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com> Claude-Session: https://claude.ai/code/session_01ARqBYLxrHqevcVmxHkpJcZ
1 parent 282dbb4 commit e39c184

2 files changed

Lines changed: 14 additions & 6 deletions

File tree

‎.github/workflows/tests.yml‎

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -29,8 +29,12 @@ jobs:
2929
coverage:
3030
name: Coverage
3131
runs-on: ubuntu-latest
32+
env:
33+
SONAR_TOKEN: ${{ secrets.SONAR_TOKEN }}
3234
steps:
3335
- uses: actions/checkout@v4
36+
with:
37+
fetch-depth: 0
3438

3539
- uses: shivammathur/setup-php@v2
3640
with:
@@ -42,6 +46,13 @@ jobs:
4246
- name: Unit tests with coverage
4347
run: phpdbg -qrr vendor/bin/unit-tests
4448

49+
# Only where the token is there, so a fork or a repository without it still passes.
50+
- name: SonarCloud
51+
if: env.SONAR_TOKEN != ''
52+
uses: SonarSource/sonarqube-scan-action@v5
53+
env:
54+
SONAR_HOST_URL: https://sonarcloud.io
55+
4556
static-analysis:
4657
name: Static analysis
4758
runs-on: ubuntu-latest

‎README.md‎

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,13 @@
11
# Quillstack Parameter Bag
22

33
[![Tests](https://github.com/quillstack/parameter-bag/actions/workflows/tests.yml/badge.svg)](https://github.com/quillstack/parameter-bag/actions/workflows/tests.yml)
4+
[![Latest Version](https://img.shields.io/packagist/v/quillstack/parameter-bag.svg)](https://packagist.org/packages/quillstack/parameter-bag)
45
[![Downloads](https://img.shields.io/packagist/dt/quillstack/parameter-bag.svg)](https://packagist.org/packages/quillstack/parameter-bag)
5-
[![Coverage](https://sonarcloud.io/api/project_badges/measure?project=quillstack_parameter-bag&metric=coverage)](https://sonarcloud.io/dashboard?id=quillstack_parameter-bag)
6-
[![Lines of Code](https://sonarcloud.io/api/project_badges/measure?project=quillstack_parameter-bag&metric=ncloc)](https://sonarcloud.io/dashboard?id=quillstack_parameter-bag)
6+
[![PHP Version](https://img.shields.io/packagist/php-v/quillstack/parameter-bag)](https://packagist.org/packages/quillstack/parameter-bag)
77
[![StyleCI](https://github.styleci.io/repos/301009689/shield?branch=main)](https://github.styleci.io/repos/301009689?branch=main)
88
[![CodeFactor](https://www.codefactor.io/repository/github/quillstack/parameter-bag/badge)](https://www.codefactor.io/repository/github/quillstack/parameter-bag)
9-
![Packagist License](https://img.shields.io/packagist/l/quillstack/parameter-bag)
10-
[![Reliability Rating](https://sonarcloud.io/api/project_badges/measure?project=quillstack_parameter-bag&metric=reliability_rating)](https://sonarcloud.io/dashboard?id=quillstack_parameter-bag)
119
[![Maintainability](https://api.codeclimate.com/v1/badges/1f996fd6d656be7285c3/maintainability)](https://codeclimate.com/github/quillstack/parameter-bag/maintainability)
12-
[![Security Rating](https://sonarcloud.io/api/project_badges/measure?project=quillstack_parameter-bag&metric=security_rating)](https://sonarcloud.io/dashboard?id=quillstack_parameter-bag)
13-
![Packagist PHP Version Support](https://img.shields.io/packagist/php-v/quillstack/parameter-bag)
10+
[![License](https://img.shields.io/packagist/l/quillstack/parameter-bag)](https://github.com/quillstack/parameter-bag/blob/main/LICENSE)
1411

1512
Simple key-value storage.
1613

0 commit comments

Comments
 (0)