Compare commits

...

45 Commits

Author SHA1 Message Date
chris48s
d7d3edb409 Revert "https://github.com/bcoe/v8-coverage/pull/2"
This reverts commit 9b020a31c1.
2024-06-17 20:26:04 +01:00
chris48s
9b020a31c1 https://github.com/bcoe/v8-coverage/pull/2
node 22 again
2024-06-17 20:22:35 +01:00
chris48s
9f27d35429 always 2024-06-17 20:10:30 +01:00
chris48s
4111fc05f7 split out 2024-06-17 20:07:51 +01:00
chris48s
6a04fe7861 skip integration 2024-06-17 19:51:54 +01:00
chris48s
773f675c18 try main tests again 2024-06-17 19:24:43 +01:00
chris48s
c444868472 Revert "node 22"
This reverts commit a8f5ef341b.
2024-06-17 19:19:26 +01:00
chris48s
a8f5ef341b node 22 2024-06-17 19:03:07 +01:00
chris48s
a167058426 always upload artifact 2024-06-17 18:40:22 +01:00
chris48s
bb20e3a385 comment main tests for now 2024-06-17 18:26:38 +01:00
chris48s
afb185bf09 run on push for now 2024-06-17 18:18:27 +01:00
chris48s
05b35d1ac3 wip 2024-06-17 18:14:50 +01:00
dependabot[bot]
870b3f4be2 chore(deps): bump simple-icons from 12.2.0 to 12.3.0 (#10263)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 12.2.0 to 12.3.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/12.2.0...12.3.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-16 16:16:10 +00:00
Pierre-Yves Bigourdan
d69661600e Improve Docusaurus Dependabot setup (#10262)
* Improve Docusaurus Dependabot setup

* Add slashes to patterns
2024-06-16 15:50:54 +00:00
dependabot[bot]
05f0d866da chore(deps): bump simple-icons from 12.1.0 to 12.2.0 (#10255)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 12.1.0 to 12.2.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/12.1.0...12.2.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 18:05:30 +00:00
dependabot[bot]
2f2df5ba06 chore(deps-dev): bump @typescript-eslint/parser from 7.12.0 to 7.13.0 (#10258)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.12.0 to 7.13.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.13.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:59:29 +00:00
dependabot[bot]
f905aa4fbe chore(deps): bump graphql from 16.8.1 to 16.8.2 (#10253)
Bumps [graphql](https://github.com/graphql/graphql-js) from 16.8.1 to 16.8.2.
- [Release notes](https://github.com/graphql/graphql-js/releases)
- [Commits](https://github.com/graphql/graphql-js/compare/v16.8.1...v16.8.2)

---
updated-dependencies:
- dependency-name: graphql
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:48:51 +00:00
dependabot[bot]
497189f007 chore(deps-dev): bump lint-staged from 15.2.5 to 15.2.7 (#10256)
Bumps [lint-staged](https://github.com/okonet/lint-staged) from 15.2.5 to 15.2.7.
- [Release notes](https://github.com/okonet/lint-staged/releases)
- [Changelog](https://github.com/lint-staged/lint-staged/blob/master/CHANGELOG.md)
- [Commits](https://github.com/okonet/lint-staged/compare/v15.2.5...v15.2.7)

---
updated-dependencies:
- dependency-name: lint-staged
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:46:36 +00:00
dependabot[bot]
73c4f45eee chore(deps): bump @sentry/node from 8.8.0 to 8.9.2 (#10259)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 8.8.0 to 8.9.2.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/8.8.0...8.9.2)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:45:30 +00:00
dependabot[bot]
b5c69ce1bb chore(deps-dev): bump c8 from 9.1.0 to 10.1.2 (#10252)
Bumps [c8](https://github.com/bcoe/c8) from 9.1.0 to 10.1.2.
- [Release notes](https://github.com/bcoe/c8/releases)
- [Changelog](https://github.com/bcoe/c8/blob/main/CHANGELOG.md)
- [Commits](https://github.com/bcoe/c8/compare/v9.1.0...v10.1.2)

---
updated-dependencies:
- dependency-name: c8
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:45:07 +00:00
dependabot[bot]
ed9f4bf2ff chore(deps-dev): bump chai-as-promised from 7.1.2 to 8.0.0 (#10254)
Bumps [chai-as-promised](https://github.com/chaijs/chai-as-promised) from 7.1.2 to 8.0.0.
- [Release notes](https://github.com/chaijs/chai-as-promised/releases)
- [Commits](https://github.com/chaijs/chai-as-promised/compare/v7.1.2...v8.0.0)

---
updated-dependencies:
- dependency-name: chai-as-promised
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:44:51 +00:00
dependabot[bot]
18e9b2aa37 chore(deps-dev): bump eslint-plugin-jsdoc from 48.2.9 to 48.2.12 (#10257)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 48.2.9 to 48.2.12.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.2.9...v48.2.12)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:44:13 +00:00
dependabot[bot]
95df3200f4 chore(deps-dev): bump prettier from 3.3.1 to 3.3.2 (#10260)
Bumps [prettier](https://github.com/prettier/prettier) from 3.3.1 to 3.3.2.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.3.1...3.3.2)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-14 17:43:58 +00:00
Pierre-Yves Bigourdan
8698fa1838 Update documentation and tests to [docsrs] (#10240)
* Update documentation and tests to [docsrs]

* Fix language identifier

* Replace tensorflow with tokio
2024-06-10 07:13:42 +00:00
Pierre-Yves Bigourdan
6be6c1d59f Add [Docker] support for loong64 arch (#10241)
* Add [Docker] support for loong64 arch

* Fix Docker version test
2024-06-09 22:42:25 +02:00
dependabot[bot]
0b4f0c837a chore(deps-dev): bump @docusaurus/core from 3.3.2 to 3.4.0 (#10239)
* chore(deps-dev): bump @docusaurus/core from 3.3.2 to 3.4.0

Bumps [@docusaurus/core](https://github.com/facebook/docusaurus/tree/HEAD/packages/docusaurus) from 3.3.2 to 3.4.0.
- [Release notes](https://github.com/facebook/docusaurus/releases)
- [Changelog](https://github.com/facebook/docusaurus/blob/main/CHANGELOG.md)
- [Commits](https://github.com/facebook/docusaurus/commits/v3.4.0/packages/docusaurus)

---
updated-dependencies:
- dependency-name: "@docusaurus/core"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>

* update @docusaurus/preset-classic

---------

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
Co-authored-by: chris48s <git@chris-shaw.dev>
2024-06-09 19:17:09 +00:00
dependabot[bot]
d33d57170f chore(deps-dev): bump cypress from 13.10.0 to 13.11.0 (#10229)
Bumps [cypress](https://github.com/cypress-io/cypress) from 13.10.0 to 13.11.0.
- [Release notes](https://github.com/cypress-io/cypress/releases)
- [Changelog](https://github.com/cypress-io/cypress/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/cypress-io/cypress/compare/v13.10.0...v13.11.0)

---
updated-dependencies:
- dependency-name: cypress
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-09 19:01:22 +00:00
dependabot[bot]
0360ba3a1b chore(deps): bump got from 14.3.0 to 14.4.1 (#10236)
Bumps [got](https://github.com/sindresorhus/got) from 14.3.0 to 14.4.1.
- [Release notes](https://github.com/sindresorhus/got/releases)
- [Commits](https://github.com/sindresorhus/got/compare/v14.3.0...v14.4.1)

---
updated-dependencies:
- dependency-name: got
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 09:10:45 +00:00
dependabot[bot]
82769bd588 chore(deps-dev): bump @easyops-cn/docusaurus-search-local (#10233)
Bumps [@easyops-cn/docusaurus-search-local](https://github.com/easyops-cn/docusaurus-search-local/tree/HEAD/packages/docusaurus-search-local) from 0.41.0 to 0.44.0.
- [Release notes](https://github.com/easyops-cn/docusaurus-search-local/releases)
- [Commits](https://github.com/easyops-cn/docusaurus-search-local/commits/v0.44.0/packages/docusaurus-search-local)

---
updated-dependencies:
- dependency-name: "@easyops-cn/docusaurus-search-local"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 09:08:57 +00:00
dependabot[bot]
ba6bddf4bc chore(deps-dev): bump prettier from 3.2.5 to 3.3.1 (#10232)
Bumps [prettier](https://github.com/prettier/prettier) from 3.2.5 to 3.3.1.
- [Release notes](https://github.com/prettier/prettier/releases)
- [Changelog](https://github.com/prettier/prettier/blob/main/CHANGELOG.md)
- [Commits](https://github.com/prettier/prettier/compare/3.2.5...3.3.1)

---
updated-dependencies:
- dependency-name: prettier
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 09:08:16 +00:00
dependabot[bot]
3bd604bc8e chore(deps-dev): bump @typescript-eslint/parser from 7.11.0 to 7.12.0 (#10228)
Bumps [@typescript-eslint/parser](https://github.com/typescript-eslint/typescript-eslint/tree/HEAD/packages/parser) from 7.11.0 to 7.12.0.
- [Release notes](https://github.com/typescript-eslint/typescript-eslint/releases)
- [Changelog](https://github.com/typescript-eslint/typescript-eslint/blob/main/packages/parser/CHANGELOG.md)
- [Commits](https://github.com/typescript-eslint/typescript-eslint/commits/v7.12.0/packages/parser)

---
updated-dependencies:
- dependency-name: "@typescript-eslint/parser"
  dependency-type: direct:development
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 09:03:45 +00:00
dependabot[bot]
d0f17a4f00 chore(deps-dev): bump danger from 12.3.0 to 12.3.1 (#10235)
Bumps [danger](https://github.com/danger/danger-js) from 12.3.0 to 12.3.1.
- [Release notes](https://github.com/danger/danger-js/releases)
- [Changelog](https://github.com/danger/danger-js/blob/main/CHANGELOG.md)
- [Commits](https://github.com/danger/danger-js/compare/12.3.0...12.3.1)

---
updated-dependencies:
- dependency-name: danger
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 09:03:16 +00:00
dependabot[bot]
cfa6bb3d69 chore(deps): bump @sentry/node from 8.7.0 to 8.8.0 (#10234)
Bumps [@sentry/node](https://github.com/getsentry/sentry-javascript) from 8.7.0 to 8.8.0.
- [Release notes](https://github.com/getsentry/sentry-javascript/releases)
- [Changelog](https://github.com/getsentry/sentry-javascript/blob/develop/CHANGELOG.md)
- [Commits](https://github.com/getsentry/sentry-javascript/compare/8.7.0...8.8.0)

---
updated-dependencies:
- dependency-name: "@sentry/node"
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 09:02:34 +00:00
dependabot[bot]
7a5628587e chore(deps): bump smol-toml from 1.2.0 to 1.2.1 (#10231)
Bumps [smol-toml](https://github.com/squirrelchat/smol-toml) from 1.2.0 to 1.2.1.
- [Release notes](https://github.com/squirrelchat/smol-toml/releases)
- [Commits](https://github.com/squirrelchat/smol-toml/compare/v1.2.0...v1.2.1)

---
updated-dependencies:
- dependency-name: smol-toml
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:56:54 +00:00
dependabot[bot]
db0ed00d0e chore(deps): bump pg from 8.11.5 to 8.12.0 (#10237)
Bumps [pg](https://github.com/brianc/node-postgres/tree/HEAD/packages/pg) from 8.11.5 to 8.12.0.
- [Changelog](https://github.com/brianc/node-postgres/blob/master/CHANGELOG.md)
- [Commits](https://github.com/brianc/node-postgres/commits/pg@8.12.0/packages/pg)

---
updated-dependencies:
- dependency-name: pg
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:56:20 +00:00
dependabot[bot]
3fd95638de chore(deps-dev): bump nodemon from 3.1.2 to 3.1.3 (#10230)
Bumps [nodemon](https://github.com/remy/nodemon) from 3.1.2 to 3.1.3.
- [Release notes](https://github.com/remy/nodemon/releases)
- [Commits](https://github.com/remy/nodemon/compare/v3.1.2...v3.1.3)

---
updated-dependencies:
- dependency-name: nodemon
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:52:46 +00:00
dependabot[bot]
f6f01a9337 chore(deps): bump simple-icons from 12.0.0 to 12.1.0 (#10227)
Bumps [simple-icons](https://github.com/simple-icons/simple-icons) from 12.0.0 to 12.1.0.
- [Release notes](https://github.com/simple-icons/simple-icons/releases)
- [Commits](https://github.com/simple-icons/simple-icons/compare/12.0.0...12.1.0)

---
updated-dependencies:
- dependency-name: simple-icons
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:37:58 +00:00
dependabot[bot]
71d11eea4b chore(deps-dev): bump eslint-plugin-chai-friendly from 0.8.0 to 1.0.0 (#10226)
Bumps [eslint-plugin-chai-friendly](https://github.com/ihordiachenko/eslint-plugin-chai-friendly) from 0.8.0 to 1.0.0.
- [Release notes](https://github.com/ihordiachenko/eslint-plugin-chai-friendly/releases)
- [Commits](https://github.com/ihordiachenko/eslint-plugin-chai-friendly/compare/v0.8.0...v1.0.0)

---
updated-dependencies:
- dependency-name: eslint-plugin-chai-friendly
  dependency-type: direct:development
  update-type: version-update:semver-major
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:29:19 +00:00
dependabot[bot]
2b7951f9de chore(deps-dev): bump eslint-plugin-jsdoc from 48.2.7 to 48.2.9 (#10225)
Bumps [eslint-plugin-jsdoc](https://github.com/gajus/eslint-plugin-jsdoc) from 48.2.7 to 48.2.9.
- [Release notes](https://github.com/gajus/eslint-plugin-jsdoc/releases)
- [Changelog](https://github.com/gajus/eslint-plugin-jsdoc/blob/main/.releaserc)
- [Commits](https://github.com/gajus/eslint-plugin-jsdoc/compare/v48.2.7...v48.2.9)

---
updated-dependencies:
- dependency-name: eslint-plugin-jsdoc
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:26:36 +00:00
dependabot[bot]
1e7819dad4 chore(deps-dev): bump start-server-and-test from 2.0.3 to 2.0.4 (#10238)
Bumps [start-server-and-test](https://github.com/bahmutov/start-server-and-test) from 2.0.3 to 2.0.4.
- [Release notes](https://github.com/bahmutov/start-server-and-test/releases)
- [Commits](https://github.com/bahmutov/start-server-and-test/compare/v2.0.3...v2.0.4)

---
updated-dependencies:
- dependency-name: start-server-and-test
  dependency-type: direct:development
  update-type: version-update:semver-patch
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2024-06-08 08:24:04 +00:00
chris48s
437adc67ce simpleicons 12 blog (#10222) 2024-06-04 19:21:44 +01:00
Romain Tartière
d23f26b8d6 Add puppetforge quality score badges (#10201)
The Puppet Forge run static analysis on modules and provide a score
through a (currently) internal API.

Waybe it will be in the public API in the future, but when this happen
adjusting the URL should be easy.  In the meantime, use this internal
API.
2024-06-04 18:13:06 +00:00
Pierre-Yves Bigourdan
81585acd6b Fix [GithubPullRequestCheckState] test (#10200) 2024-06-02 22:43:55 +02:00
Pierre-Yves Bigourdan
f1727a38c1 Switch Cobertura job URL (#10217) 2024-06-02 20:29:25 +00:00
Pierre-Yves Bigourdan
39a17b69d3 Fully mock flaky [CodeClimate] multi-step tests (#10218) 2024-06-02 20:29:07 +00:00
19 changed files with 982 additions and 589 deletions

View File

@@ -16,7 +16,20 @@ updates:
# https://caniuse.com/js-regexp-lookbehind
- dependency-name: 'decamelize'
- dependency-name: 'humanize-string'
groups:
# All official @docusaurus/* packages should have the exact same version as @docusaurus/core.
# From https://docs.github.com/en/code-security/dependabot/dependabot-version-updates/configuration-options-for-the-dependabot.yml-file#groups:
# "You cannot apply a single grouping set of rules to both version updates and security
# updates [...] you must define two, separately named, grouping sets of rules"
# See https://github.com/badges/shields/issues/10242 for more information.
docusaurus-version-updates:
applies-to: version-updates
patterns:
- '@docusaurus/*'
docusaurus-security-updates:
applies-to: security-updates
patterns:
- '@docusaurus/*'
# badge-maker package dependencies
- package-ecosystem: npm
directory: '/badge-maker'

95
.github/workflows/daily-tests.yml vendored Normal file
View File

@@ -0,0 +1,95 @@
name: Run Daily Service Tests
on:
schedule:
- cron: '45 3 * * *'
# At 03:45, daily
workflow_dispatch:
push:
jobs:
daily-tests:
runs-on: ubuntu-latest
services:
postgres:
image: postgres
env:
POSTGRES_USER: postgres
POSTGRES_PASSWORD: postgres
POSTGRES_DB: ci_test
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Setup
uses: ./.github/actions/setup
with:
node-version: 20
- name: Migrate DB
run: npm run migrate up
env:
POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/ci_test
- name: Run core tests
run: npm run coverage:test:core
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/core/results.xml
- name: Run package tests
run: npm run coverage:test:package
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/package/results.xml
- name: Run entrypoint tests
run: npm run coverage:test:entrypoint
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/entrypoint/results.xml
- name: Run integration tests
run: npm run coverage:test:integration
if: always()
env:
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/integration/results.xml
GH_TOKEN: '${{ secrets.GH_PAT }}'
POSTGRES_URL: postgresql://postgres:postgres@localhost:5432/ci_test
- name: Run service tests
run: npm run coverage:test:services
if: always()
env:
RETRY_COUNT: 3
GH_TOKEN: '${{ secrets.GH_PAT }}'
LIBRARIESIO_TOKENS: '${{ secrets.SERVICETESTS_LIBRARIESIO_TOKENS }}'
OBS_USER: '${{ secrets.SERVICETESTS_OBS_USER }}'
OBS_PASS: '${{ secrets.SERVICETESTS_OBS_PASS }}'
PEPY_KEY: '${{ secrets.SERVICETESTS_PEPY_KEY }}'
SL_INSIGHT_USER_UUID: '${{ secrets.SERVICETESTS_SL_INSIGHT_USER_UUID }}'
SL_INSIGHT_API_TOKEN: '${{ secrets.SERVICETESTS_SL_INSIGHT_API_TOKEN }}'
TWITCH_CLIENT_ID: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_ID }}'
TWITCH_CLIENT_SECRET: '${{ secrets.SERVICETESTS_TWITCH_CLIENT_SECRET }}'
WHEELMAP_TOKEN: '${{ secrets.SERVICETESTS_WHEELMAP_TOKEN }}'
YOUTUBE_API_KEY: '${{ secrets.SERVICETESTS_YOUTUBE_API_KEY }}'
mocha_reporter: mocha-junit-reporter
MOCHA_FILE: junit/services/results.xml
- name: Upload artifact
uses: actions/upload-artifact@v4
if: always()
with:
path: junit/**/*

View File

@@ -71,7 +71,7 @@ Each service has a directory for its files:
`/services/example/example.service.js`.
If you add a badge for a new API, create a new directory.
Example: [wercker](https://github.com/badges/shields/tree/master/services/wercker)
Example: [Docs.rs](https://github.com/badges/shields/tree/master/services/docsrs)
- For service families with multiple badges we usually store the code for each
badge in its own file like this:

View File

@@ -12,7 +12,7 @@ automated tests should be included. They serve three purposes:
3. They speed up future contributors when they are debugging or improving a
badge.
Test should cover:
Tests should cover:
1. Valid behavior
2. Optional parameters like tags or branches
@@ -24,11 +24,11 @@ Test should cover:
Before getting started, set up a development environment by following the
[setup instructions](https://github.com/badges/shields/blob/master/doc/TUTORIAL.md#2-setup)
We will write some tests for the [Wercker Build service](https://github.com/badges/shields/blob/master/services/wercker/wercker.service.js)
We will write some tests for [Docs.rs](https://github.com/badges/shields/blob/master/services/docsrs/docsrs.service.js), a service that builds documentation of crates, which are packages in the Rust programming language.
### (1) Boilerplate
The code for our badge is in `services/wercker/wercker.service.js`. Tests for this badge should be stored in `services/wercker/wercker.tester.js`.
The code for our badge is in `services/docsrs/docsrs.service.js`. Tests for this badge should be stored in `services/docsrs/docsrs.tester.js`.
We'll start by adding some boilerplate to our file:
@@ -41,8 +41,8 @@ export const t = await createServiceTester()
If our `.service.js` module exports a single class, we can
`createServiceTester`, which uses convention to create a
`ServiceTester` object. Calling this inside
`services/wercker/wercker.tester.js` will create a `ServiceTester` object
configured for the service exported in `services/wercker/wercker.service.js`.
`services/docsrs/docsrs.tester.js` will create a `ServiceTester` object
configured for the service exported in `services/docsrs/docsrs.service.js`.
We will add our tests to this `ServiceTester` object `t`, which is exported
from the module.
@@ -51,27 +51,30 @@ from the module.
First we'll add a test for the typical case:
```js
import { isBuildStatus } from '../test-validators.js'
import Joi from 'joi'
t.create('Build status')
.get('/build/wercker/go-wercker-api.json')
.expectBadge({ label: 'build', message: isBuildStatus })
t.create('Docs with no version specified')
.get('/tokio.json')
.expectBadge({
label: 'docs',
message: Joi.allow('passing', 'failing'),
})
```
1. The `create()` method adds a new test to the tester object.
The chained-on calls come from the API testing framework [IcedFrisby][].
Here's a [longer example][] and the complete [API guide][icedfrisby api].
2. We use the `get()` method to request a badge. There are several points to consider here:
- We need a real project to test against. In this case we have used [wercker/go-wercker-api](https://app.wercker.com/wercker/go-wercker-api/runs) but we could have chosen any stable project.
- We need a real crate to test against. In this case we have used [Tokio](https://docs.rs/tokio) but we could have chosen any one.
- Note that when we call our badge, we are allowing it to communicate with an external service without mocking the response. We write tests which interact with external services, which is unusual practice in unit testing. We do this because one of the purposes of service tests is to notify us if a badge has broken due to an upstream API change. For this reason it is important for at least one test to call the live API without mocking the interaction.
- All badges on shields can be requested in a number of formats. As well as calling https://img.shields.io/wercker/build/wercker/go-wercker-api.svg to generate ![](https://img.shields.io/wercker/build/wercker/go-wercker-api.svg) we can also call https://img.shields.io/wercker/build/wercker/go-wercker-api.json to request the same content as JSON. When writing service tests, we request the badge in JSON format so it is easier to make assertions about the content.
- We don't need to explicitly call `/wercker/build/wercker/go-wercker-api.json` here, only `/build/wercker/go-wercker-api.json`. When we create a tester object with `createServiceTester()` the URL base defined in our service class (in this case `/wercker`) is used as the base URL for any requests made by the tester object.
- All badges on shields can be requested in a number of formats. As well as calling https://img.shields.io/docsrs/tokio.svg to generate ![](https://img.shields.io/docsrs/tokio.svg) we can also call https://img.shields.io/docsrs/tokio.json to request the same content as JSON. When writing service tests, we request the badge in JSON format so it is easier to make assertions about the content.
- We don't need to explicitly call `/docsrs/tokio.json` here, only `/tokio.json`. When we create a tester object with `createServiceTester()` the URL base defined in our service class (in this case `/docsrs`) is used as the base URL for any requests made by the tester object.
3. `expectBadge()` is a helper function which accepts either a string literal, a [RegExp][] or a [Joi][] schema for the different fields.
Joi is a validation library that is built into IcedFrisby which you can use to
match based on a set of allowed strings, regexes, or specific values. You can
refer to their [API reference][joi api].
4. We expect `label` to be a string literal `"build"`.
5. Because this test depends on a live service, we don't want our test to depend on our API call returning a particular build status. Instead we should perform a "picture check" to assert that the badge data conforms to an expected pattern. Our test should not depend on the status of the example project's build, but should fail if trying to generate the badge throws an error, or if there is a breaking change to the upstream API. In this case we will use a pre-defined regular expression to check that the badge value looks like a build status. [services/test-validators.js](https://github.com/badges/shields/blob/master/services/test-validators.js) defines a number of useful validators we can use. Many of the common badge types (version, downloads, rank, etc.) already have validators defined here.
4. We expect `label` to be a string literal `"docs"`.
5. Because this test depends on a live service, we don't want our test to depend on our API call returning a particular build status. Instead we should perform a "picture check" to assert that the badge data conforms to an expected pattern. Our test should not depend on the status of the example crates's documentation build, but should fail if trying to generate the badge throws an error, or if there is a breaking change to the upstream API. In this case, we specify a list with all possible response values, `Joi.allow('passing', 'failing')`. For more complex cases, [services/test-validators.js](https://github.com/badges/shields/blob/master/services/test-validators.js) defines a number of useful validators we can use with regular expressions. Many of the common badge types (version, downloads, rank, etc.) already have validators defined there.
When defining an IcedFrisby test, typically you would invoke the `toss()`
method, to register the test. This is not necessary, because the Shields test
@@ -89,7 +92,7 @@ harness will call it for you.
Lets run the test we have written:
```
npm run test:services -- --only=wercker
npm run test:services -- --only=docsrs
```
The `--only=` option indicates which service or services you want to test. You
@@ -101,11 +104,12 @@ runner.
Here's the output:
```
Server is starting up: http://lib/service-test-runner/cli.js:80/
Wercker
Build status
[ GET /build/wercker/go-wercker-api.json ] (572ms)
Server is starting up: http://localhost:1111/
DocsRs
[live] Docs with no version specified
[ GET /tokio.json ] (441ms)
1 passing (1s)
```
@@ -115,80 +119,98 @@ That's looking good!
Sometimes if we have a failing test, it is useful to be able to see some logging output to help work out why the test is failing. We can do that by calling `npm run test:services:trace`. Try running
```
npm run test:services:trace -- --only=wercker
npm run test:services:trace -- --only=docsrs
```
to run the test with some additional debug output.
### (4) Writing More Tests
We should write tests cases for valid paths through our code. The Wercker badge supports an optional branch parameter so we'll add a second test for a branch build.
We should write tests cases for valid paths through our code. The Docs.rs badge supports an optional version parameter so we'll add a second test for a branch build. In this case, we know for sure that the documentation for this older version was successfully built, we specify a string literal instead of a Joi schema for `message`. This narrows down the expectation and gives us a more helpful error message if the test fails.
```js
t.create('Build status (with branch)')
.get('/build/wercker/go-wercker-api/master.json')
.expectBadge({ label: 'build', message: isBuildStatus })
t.create('Passing docs for version').get('/tokio/1.37.0.json').expectBadge({
label: 'docs@1.37.0',
message: 'passing',
color: 'brightgreen',
})
```
```
Server is starting up: http://lib/service-test-runner/cli.js:80/
Wercker
Build status
[ GET /build/wercker/go-wercker-api.json ] (572ms)
Build status (with branch)
[ GET /build/wercker/go-wercker-api/master.json ] (368ms)
Server is starting up: http://localhost:1111/
DocsRs
[live] Docs with no version specified
[ GET /tokio.json ] (408ms)
[live] Passing docs for version
[ GET /tokio/1.37.0.json ] (171ms)
2 passing (1s)
2 passing (2s)
```
Once we have multiple tests, sometimes it is useful to run only one test. We can do this using the `--fgrep` argument. For example:
```
npm run test:services -- --only="wercker" --fgrep="Build status (with branch)"
npm run test:services -- --only="docsrs" --fgrep="Passing docs for version"
```
Having covered the typical and custom cases, we'll move on to errors. We should include a test for the 'not found' response and also tests for any other custom error handling. The Wercker integration defines a custom error condition for 401 as well as a custom 404 message:
Documentation for tokio version 1.32.1 failed to build, we can also add a corresponding test:
```js
httpErrors: {
401: 'private application not supported',
404: 'application not found',
}
t.create('Failing docs for version').get('/tokio/1.32.1.json').expectBadge({
label: 'docs@1.32.1',
message: 'failing',
color: 'red',
})
```
First we'll add a test for a project which will return a 404 error:
Note that in these tests, we have specified a `color` parameter in `expectBadge`. This is helpful in a case like this when we want to test custom color logic, but it is only necessary to explicitly test color values if our badge implements custom logic for setting the badge colors.
Having covered the typical and custom cases, we'll move on to errors. We should include a test for the 'not found' response and also tests for any other custom error handling. When a version is specified, the Docs.rs integration defines a custom error condition for 400 status codes:
```js
t.create('Build status (application not found)')
.get('/build/some-project/that-doesnt-exist.json')
.expectBadge({ label: 'build', message: 'application not found' })
httpErrors: version ? { 400: 'malformed version' } : {},
```
In this case we are expecting a string literal instead of a pattern for `message`. This narrows down the expectation and gives us a more helpful error message if the test fails.
We also want to include a test for the 'private application not supported' case. One way to do this would be to find another example of a private project which is unlikely to change. For example:
First we'll add a test for a crate and a test for a version which will return 404 errors:
```js
t.create('Build status (private application)')
.get('/build/wercker/blueprint.json')
.expectBadge({ label: 'build', message: 'private application not supported' })
t.create('Crate not found')
.get('/not-a-crate/latest.json')
.expectBadge({ label: 'docs', message: 'not found' })
t.create('Version not found')
.get('/tokio/0.8.json')
.expectBadge({ label: 'docs', message: 'not found' })
```
We also want to include a test for a case where a malformed version was specified. For example:
```js
t.create('Malformed version')
.get('/tokio/not-a-version.json')
.expectBadge({ label: 'docs', message: 'malformed version' })
```
## (5) Mocking Responses
If we didn't have a stable example of a private project, another approach would be to mock the response. An alternative test for the 'private application' case might look like:
If we didn't have a stable example of crate version with a failing documentation build, another approach would be to mock the response. An alternative test for the 'Failing docs for version' case might look like:
```js
t.create('Build status (private application)')
.get('/build/wercker/go-wercker-api.json')
t.create('Failing docs for version')
.get('/tokio/1.32.1.json')
.intercept(nock =>
nock('https://app.wercker.com/api/v3/applications/')
.get('/wercker/go-wercker-api/builds?limit=1')
.reply(401),
nock('https://docs.rs/crate')
.get('/tokio/1.32.1/status.json')
.reply(200, { doc_status: false }),
)
.expectBadge({ label: 'build', message: 'private application not supported' })
.expectBadge({
label: 'docs@1.32.1',
message: 'failing',
color: 'red',
})
```
This will intercept the request and provide our own mock response.
@@ -204,49 +226,6 @@ and path.
[icedfrisby-nock]: https://github.com/paulmelnikow/icedfrisby-nock#usage
[nock]: https://github.com/node-nock/nock
Our test suite should also include service tests which receive a known value from the API. For example, in the `render()` method of our service, there is some logic which sets the badge color based on the build status:
```js
static render({ status, result }) {
if (status === 'finished') {
if (result === 'passed') {
return { message: 'passing', color: 'brightgreen' }
} else {
return { message: result, color: 'red' }
}
}
return { message: status }
}
```
We can also use nock to intercept API calls to return a known response body.
```js
t.create('Build passed')
.get('/build/wercker/go-wercker-api.json')
.intercept(nock =>
nock('https://app.wercker.com/api/v3/applications/')
.get('/wercker/go-wercker-api/builds?limit=1')
.reply(200, [{ status: 'finished', result: 'passed' }]),
)
.expectBadge({
label: 'build',
message: 'passing',
color: 'brightgreen',
})
t.create('Build failed')
.get('/build/wercker/go-wercker-api.json')
.intercept(nock =>
nock('https://app.wercker.com/api/v3/applications/')
.get('/wercker/go-wercker-api/builds?limit=1')
.reply(200, [{ status: 'finished', result: 'failed' }]),
)
.expectBadge({ label: 'build', message: 'failed', color: 'red' })
```
Note that in these tests, we have specified a `color` parameter in `expectBadge`. This is helpful in a case like this when we want to test custom color logic, but it is only necessary to explicitly test color values if our badge implements custom logic for setting the badge colors.
## Code coverage
By checking code coverage, we can make sure we've covered all our bases.
@@ -254,7 +233,7 @@ By checking code coverage, we can make sure we've covered all our bases.
We can generate a coverage report and open it:
```
npm run coverage:test:services -- -- --only=wercker
npm run coverage:test:services -- -- --only=docsrs
npm run coverage:report:open
```

View File

@@ -0,0 +1,33 @@
---
slug: simple-icons-12
title: Simple Icons 12
authors:
name: chris48s
title: Shields.io Core Team
url: https://github.com/chris48s
image_url: https://avatars.githubusercontent.com/u/6025893
tags: []
---
Logos on Shields.io are provided by SimpleIcons. We've recently upgraded to SimpleIcons 12. This release removes the following 10 icons:
- FITE
- Flattr
- Google Bard
- Integromat
- Niantic
- Nintendo Network
- Rome
- Shotcut
- Skynet
- Twitter
And renames the following 3:
- Airbrake.io to Airbrake
- Amazon AWS to Amazon Web Services
- RStudio to RStudio IDE
More details can be found in the [release notes](https://github.com/simple-icons/simple-icons/releases/tag/12.0.0).
Please remember that we are just consumers of SimpleIcons. Decisions about changes and removals are made by the [SimpleIcons](https://github.com/simple-icons/simple-icons) project.

994
package-lock.json generated

File diff suppressed because it is too large Load Diff

View File

@@ -23,7 +23,7 @@
"dependencies": {
"@renovatebot/pep440": "^3.0.20",
"@renovatebot/ruby-semver": "^3.0.23",
"@sentry/node": "^8.7.0",
"@sentry/node": "^8.9.2",
"@shields_io/camp": "^18.1.2",
"@xmldom/xmldom": "0.8.10",
"badge-maker": "file:badge-maker",
@@ -41,8 +41,8 @@
"fast-xml-parser": "^4.4.0",
"glob": "^10.4.1",
"global-agent": "^3.0.0",
"got": "^14.3.0",
"graphql": "16.8.1",
"got": "^14.4.1",
"graphql": "16.8.2",
"graphql-tag": "^2.12.6",
"joi": "17.13.1",
"joi-extension-semver": "5.0.0",
@@ -56,15 +56,15 @@
"node-pg-migrate": "^7.4.0",
"parse-link-header": "^2.0.0",
"path-to-regexp": "^6.2.2",
"pg": "^8.11.5",
"pg": "^8.12.0",
"pretty-bytes": "^6.1.1",
"priorityqueuejs": "^2.0.0",
"prom-client": "^15.1.2",
"qs": "^6.12.1",
"query-string": "^9.0.0",
"semver": "~7.6.2",
"simple-icons": "12.0.0",
"smol-toml": "1.2.0",
"simple-icons": "12.3.0",
"smol-toml": "1.2.1",
"svg-path-commander": "^2.0.9",
"webextension-store-meta": "^1.2.3",
"xpath": "~0.0.34"
@@ -145,22 +145,23 @@
]
},
"devDependencies": {
"@docusaurus/core": "^3.3.2",
"@easyops-cn/docusaurus-search-local": "^0.41.0",
"@docusaurus/core": "^3.4.0",
"@docusaurus/preset-classic": "^3.4.0",
"@easyops-cn/docusaurus-search-local": "^0.44.0",
"@mdx-js/react": "^3.0.1",
"@typescript-eslint/parser": "^7.11.0",
"c8": "^9.1.0",
"@typescript-eslint/parser": "^7.13.0",
"c8": "^10.1.2",
"caller": "^1.1.0",
"chai": "^4.4.1",
"chai-as-promised": "^7.1.2",
"chai-as-promised": "^8.0.0",
"chai-datetime": "^1.8.0",
"chai-string": "^1.4.0",
"child-process-promise": "^2.2.1",
"clsx": "^2.1.1",
"concurrently": "^8.2.2",
"cypress": "^13.10.0",
"cypress": "^13.11.0",
"cypress-wait-for-stable-dom": "^0.1.0",
"danger": "^12.3.0",
"danger": "^12.3.1",
"deepmerge": "^4.3.1",
"docusaurus-preset-openapi": "0.7.5",
"eslint": "8.57.0",
@@ -168,11 +169,11 @@
"eslint-config-standard": "17.1.0",
"eslint-config-standard-jsx": "11.0.0",
"eslint-config-standard-react": "13.0.0",
"eslint-plugin-chai-friendly": "^0.8.0",
"eslint-plugin-chai-friendly": "^1.0.0",
"eslint-plugin-cypress": "^3.3.0",
"eslint-plugin-icedfrisby": "^0.1.0",
"eslint-plugin-import": "^2.29.1",
"eslint-plugin-jsdoc": "^48.2.7",
"eslint-plugin-jsdoc": "^48.2.12",
"eslint-plugin-mocha": "^10.4.3",
"eslint-plugin-no-extension-in-require": "^0.2.0",
"eslint-plugin-node": "^11.1.0",
@@ -185,7 +186,7 @@
"icedfrisby-nock": "^2.1.0",
"is-svg": "^5.0.1",
"jsdoc": "^4.0.3",
"lint-staged": "^15.2.5",
"lint-staged": "^15.2.7",
"lodash.difference": "^4.5.0",
"minimist": "^1.2.8",
"mocha": "^10.4.0",
@@ -194,11 +195,11 @@
"mocha-yaml-loader": "^1.0.3",
"nock": "13.5.4",
"node-mocks-http": "^1.14.1",
"nodemon": "^3.1.2",
"nodemon": "^3.1.3",
"npm-run-all": "^4.1.5",
"open-cli": "^8.0.0",
"portfinder": "^1.0.32",
"prettier": "3.2.5",
"prettier": "3.3.2",
"prism-react-renderer": "^2.3.1",
"react": "^18.3.0",
"react-dom": "^18.3.1",
@@ -209,7 +210,7 @@
"sinon": "^18.0.0",
"sinon-chai": "^3.7.0",
"snap-shot-it": "^7.9.10",
"start-server-and-test": "2.0.3",
"start-server-and-test": "2.0.4",
"tsd": "^0.31.0",
"url": "^0.11.3"
},

View File

@@ -35,12 +35,12 @@ t.create('maintainability letter')
t.create('issues when outer user repos query returns multiple items')
.get('/issues/tensorflow/models.json')
.intercept(nock =>
nock('https://api.codeclimate.com', { allowUnmocked: true })
nock('https://api.codeclimate.com')
.get('/v1/repos?github_slug=tensorflow%2Fmodels')
.reply(200, {
data: [
{
id: 'xxxxxxxxxxxx', // Fake repo id, which is expected to be ignored in favour of the one that does contain snapshot data.
id: 'xxxxxxxxxxxx', // Expected to be ignored in favour of the one that does contain snapshot data.
relationships: {
latest_default_branch_snapshot: {
data: null,
@@ -51,7 +51,7 @@ t.create('issues when outer user repos query returns multiple items')
},
},
{
id: '57e2efacc718d40058000c9b', // Real repo id for tensorflow/models. The test retrieves live data using the real snapshot id below.
id: '57e2efacc718d40058000c9b',
relationships: {
latest_default_branch_snapshot: {
data: {
@@ -65,12 +65,31 @@ t.create('issues when outer user repos query returns multiple items')
},
},
],
})
.get(
'/v1/repos/57e2efacc718d40058000c9b/snapshots/65ae115f34117d0001055101',
)
.reply(200, {
data: {
attributes: {
ratings: [
{
letter: 'D',
measure: {
value: 24.73668395092537,
},
},
],
},
meta: {
issues_count: 11538,
},
},
}),
)
.networkOn() // Combined with allowUnmocked: true, this allows the inner snapshots query to go through.
.expectBadge({
label: 'issues',
message: Joi.number().integer().positive(),
message: '11538',
})
t.create('maintainability letter for non-existent repo')

View File

@@ -23,12 +23,12 @@ t.create('test coverage letter')
t.create('test coverage when outer user repos query returns multiple items')
.get('/coverage/codeclimate/codeclimate.json')
.intercept(nock =>
nock('https://api.codeclimate.com', { allowUnmocked: true })
nock('https://api.codeclimate.com')
.get('/v1/repos?github_slug=codeclimate%2Fcodeclimate')
.reply(200, {
data: [
{
id: 'xxxxxxxxxxxx', // Fake repo id, which is expected to be ignored in favour of the one that does contain snapshot data.
id: 'xxxxxxxxxxxx', // Expected to be ignored in favour of the one that does contain snapshot data.
relationships: {
latest_default_branch_snapshot: {
data: null,
@@ -39,7 +39,7 @@ t.create('test coverage when outer user repos query returns multiple items')
},
},
{
id: '558479d6e30ba034120008a9', // Real repo id for codeclimate/codeclimate. The test retrieves live data using the real test report id below.
id: '558479d6e30ba034120008a9',
relationships: {
latest_default_branch_snapshot: {
data: null,
@@ -53,12 +53,24 @@ t.create('test coverage when outer user repos query returns multiple items')
},
},
],
})
.get(
'/v1/repos/558479d6e30ba034120008a9/test_reports/65a1662cb0077b00013cb4de',
)
.reply(200, {
data: {
attributes: {
covered_percent: 24,
rating: {
letter: 'B',
},
},
},
}),
)
.networkOn() // Combined with allowUnmocked: true, this allows the inner test reports query to go through.
.expectBadge({
label: 'coverage',
message: isIntegerPercentage,
message: '24%',
})
t.create('test coverage percentage for non-existent repo')

View File

@@ -17,6 +17,7 @@ const archEnum = [
'mips64',
'mips64le',
'riscv64',
'loong64',
]
// Valid architecture values: https://golang.org/doc/install/source#environment (GOARCH)

View File

@@ -2,10 +2,12 @@ import { isSemver } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('docker version (valid, library)').get('/_/alpine.json').expectBadge({
label: 'version',
message: isSemver,
})
t.create('docker version (valid, library)')
.get('/_/memcached.json')
.expectBadge({
label: 'version',
message: isSemver,
})
t.create('docker version (valid, library with tag)')
.get('/_/alpine/latest.json')

View File

@@ -61,6 +61,7 @@ export default class DocsRs extends BaseJsonService {
return await this._requestJson({
schema,
url: `https://docs.rs/crate/${crate}/${version}/status.json`,
httpErrors: version ? { 400: 'malformed version' } : {},
})
}

View File

@@ -2,17 +2,32 @@ import Joi from 'joi'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('Passing docs')
.get('/tokio/0.3.0.json')
.expectBadge({ label: 'docs@0.3.0', message: 'passing' })
t.create('Docs with no version specified')
.get('/tokio.json')
.expectBadge({
label: 'docs',
message: Joi.allow('passing', 'failing'),
})
t.create('Failing docs')
.get('/tensorflow/0.16.1.json')
.expectBadge({ label: 'docs@0.16.1', message: 'failing' })
t.create('Passing docs for version').get('/tokio/1.37.0.json').expectBadge({
label: 'docs@1.37.0',
message: 'passing',
color: 'brightgreen',
})
t.create('Failing docs for version').get('/tokio/1.32.1.json').expectBadge({
label: 'docs@1.32.1',
message: 'failing',
color: 'red',
})
t.create('Multiple builds, latest passing')
.get('/bevy_tweening/0.3.1.json')
.expectBadge({ label: 'docs@0.3.1', message: 'passing' })
.expectBadge({
label: 'docs@0.3.1',
message: 'passing',
color: 'brightgreen',
})
t.create('Getting latest version works')
.get('/rand/latest.json')
@@ -26,5 +41,9 @@ t.create('Crate not found')
.expectBadge({ label: 'docs', message: 'not found' })
t.create('Version not found')
.get('/tokio/not-a-version.json')
.get('/tokio/0.8.json')
.expectBadge({ label: 'docs', message: 'not found' })
t.create('Malformed version')
.get('/tokio/not-a-version.json')
.expectBadge({ label: 'docs', message: 'malformed version' })

View File

@@ -17,7 +17,7 @@ t.create(
nock =>
nock('https://api.github.com', { allowUnmocked: true })
.get('/repos/badges/shields/pulls/1110')
.reply(200, JSON.stringify({ head: { sha: 'abc123' } })), // Looks like a real ref, but isn't.
.reply(200, JSON.stringify({ head: { sha: 'abcde12356' } })), // Looks like a real ref, but isn't.
)
.networkOn()
.expectBadge({

View File

@@ -120,7 +120,7 @@ export default class JenkinsCoverage extends JenkinsBase {
}),
queryParam({
name: 'jobUrl',
example: 'https://jenkins.sqlalchemy.org/job/alembic_coverage',
example: 'https://jenkins.sqlalchemy.org/job/dogpile_coverage',
required: true,
}),
],

View File

@@ -27,7 +27,7 @@ t.create('cobertura: job not found')
t.create('cobertura: job found')
.get(
'/cobertura.json?jobUrl=https://jenkins.sqlalchemy.org/job/alembic_coverage',
'/cobertura.json?jobUrl=https://jenkins.sqlalchemy.org/job/dogpile_coverage',
)
.expectBadge({ label: 'coverage', message: isIntegerPercentage })

View File

@@ -24,6 +24,27 @@ const modulesSchema = Joi.object({
),
}).required()
const modulesValidationSchema = Joi.array()
.items(
Joi.alternatives().try(
Joi.object({
name: Joi.string().valid('total').required(),
score: nonNegativeInteger,
}).required(),
Joi.object({}).required(),
),
)
.custom((value, helpers) => {
// Custom validation to check for exactly one type1 object
const totalCount = value.filter(item => item.name === 'total').length
if (totalCount !== 1) {
return helpers.message(
'Array must contain exactly one object of type "total"',
)
}
return value
})
class BasePuppetForgeUsersService extends BaseJsonService {
async fetch({ user }) {
return this._requestJson({
@@ -42,4 +63,17 @@ class BasePuppetForgeModulesService extends BaseJsonService {
}
}
export { BasePuppetForgeModulesService, BasePuppetForgeUsersService }
class BasePuppetForgeModulesValidationService extends BaseJsonService {
async fetch({ user, moduleName }) {
return this._requestJson({
schema: modulesValidationSchema,
url: `https://forgeapi.puppetlabs.com/private/validations/${user}-${moduleName}`,
})
}
}
export {
BasePuppetForgeModulesService,
BasePuppetForgeUsersService,
BasePuppetForgeModulesValidationService,
}

View File

@@ -0,0 +1,45 @@
import { coveragePercentage as coveragePercentageColor } from '../color-formatters.js'
import { pathParams } from '../index.js'
import { BasePuppetForgeModulesValidationService } from './puppetforge-base.js'
export default class PuppetforgeModuleQualityScoreService extends BasePuppetForgeModulesValidationService {
static category = 'rating'
static route = {
base: 'puppetforge/qualityscore',
pattern: ':user/:moduleName',
}
static openApi = {
'/puppetforge/qualityscore/{user}/{moduleName}': {
get: {
summary: 'Puppet Forge quality score',
parameters: pathParams(
{
name: 'user',
example: 'camptocamp',
},
{
name: 'moduleName',
example: 'openssl',
},
),
},
},
}
static defaultBadgeData = { label: 'quality score' }
static render({ score }) {
return {
message: `${score}%`,
color: coveragePercentageColor(score),
}
}
async handle({ user, moduleName }) {
const data = await this.fetch({ user, moduleName })
const qualityScore = data.find(el => el.name === 'total').score
return this.constructor.render({ score: qualityScore })
}
}

View File

@@ -0,0 +1,27 @@
import { isPercentage } from '../test-validators.js'
import { createServiceTester } from '../tester.js'
export const t = await createServiceTester()
t.create('module quality-score').get('/camptocamp/openssl.json').expectBadge({
label: 'quality score',
message: isPercentage,
})
t.create('module quality score (no ratings)')
.get('/camptocamp/openssl.json')
.intercept(nock =>
nock('https://forgeapi.puppetlabs.com/private/validations')
.get('/camptocamp-openssl')
.reply(200, []),
)
.expectBadge({
label: 'quality score',
message: 'invalid response data',
})
t.create('module quality score (not found)')
.get('/notarealuser/notarealpackage.json')
.expectBadge({
label: 'quality score',
message: 'not found',
})