Skip to content

Commit

Permalink
👷 (coverage) Configuration for unit test coverage
Browse files Browse the repository at this point in the history
  • Loading branch information
Hadrien Froger committed Dec 10, 2024
1 parent 63101d4 commit 424614e
Show file tree
Hide file tree
Showing 8 changed files with 1,407 additions and 1,366 deletions.
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -27,4 +27,5 @@ node_modules
.yarn
.local
.npm
.cache
.cache
rspec.xml
17 changes: 10 additions & 7 deletions .gitlab-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,11 +110,6 @@ ruby::rspec:
image: ruby:3.2.5
stage: test
extends: .development_rules
artifacts:
reports:
coverage_report:
coverage_format: cobertura
path: coverage/coverage.xml
variables:
DATABASE_HOST: "postgres"
# trunk-ignore(gitleaks/generic-api-key)
Expand All @@ -127,8 +122,16 @@ ruby::rspec:
before_script:
- bin/setup-tests
script:
- RAILS_ENV=test bundle exec rspec spec/decidim/

- RAILS_ENV=test bundle exec rspec spec/decidim/ --format progress --format RspecJunitFormatter --out rspec.xml
artifacts:
when: always
paths:
- rspec.xml
reports:
junit: rspec.xml
coverage_report:
coverage_format: cobertura
path: coverage/coverage.xml
# Publish decidim rest full api package
decidim-client::publish:
image: node:18.20
Expand Down
2 changes: 2 additions & 0 deletions .rspec
Original file line number Diff line number Diff line change
@@ -1 +1,3 @@
--require spec_helper
--format RspecJunitFormatter
--out rspec.xml
2 changes: 2 additions & 0 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,11 @@ end

group :test do
gem "capybara", "~> 3.40"
gem "rspec_junit_formatter", require: false
gem "rspec-rails", "~> 6.0"
gem "rubocop-faker"
gem "selenium-webdriver"
gem "simplecov-cobertura"
end

group :development do
Expand Down
2 changes: 2 additions & 0 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -818,10 +818,12 @@ DEPENDENCIES
pg
puma (>= 5.5.1)
rspec-rails (~> 6.0)
rspec_junit_formatter
rswag-specs
rubocop-faker
rubocop-rspec
selenium-webdriver
simplecov-cobertura
spring (~> 4.0)
spring-watcher-listen (~> 2.1)
uglifier (~> 4.1)
Expand Down
32 changes: 16 additions & 16 deletions contrib/decidim-node-client/api.ts
Original file line number Diff line number Diff line change
Expand Up @@ -46,23 +46,17 @@ import {
*/
export interface ApiError {
/**
* Error code, starting with HTTP Code
* @type {number}
* @memberof ApiError
*/
error_code: number;
/**
* Error message
* Error title, starting with HTTP Code, like 400: bad request
* @type {string}
* @memberof ApiError
*/
message: string;
error: string;
/**
* Error detail, mostly validation error
* @type {string}
* @memberof ApiError
*/
detail?: string;
error_description: string;
}
/**
*
Expand Down Expand Up @@ -559,6 +553,12 @@ export interface IntrospectData {
* @memberof IntrospectData
*/
sub: number;
/**
* If the token can be used
* @type {boolean}
* @memberof IntrospectData
*/
active: boolean;
/**
*
* @type {IntrospectDataResource}
Expand Down Expand Up @@ -600,7 +600,7 @@ export type IntrospectDataResourceTypeEnum =
(typeof IntrospectDataResourceTypeEnum)[keyof typeof IntrospectDataResourceTypeEnum];

/**
*
* Details about the token beeing used
* @export
* @interface IntrospectResponse
*/
Expand Down Expand Up @@ -949,7 +949,7 @@ export interface SpaceRelationships {
components: AttachedComponents;
}
/**
*
* Definition of one specific space
* @export
* @interface SpaceResponse
*/
Expand All @@ -962,7 +962,7 @@ export interface SpaceResponse {
data: Space;
}
/**
*
* List of spaces
* @export
* @interface SpacesResponse
*/
Expand Down Expand Up @@ -2040,7 +2040,7 @@ export const PublicApiAxiosParamCreator = function (
},
/**
*
* @summary Show Participatory Spaces
* @summary Show Participatory Space
* @param {number} id
* @param {PublicManifestNameIdGetManifestNameEnum} manifestName
* @param {Array<PublicManifestNameIdGetLocalesEnum>} [locales]
Expand Down Expand Up @@ -2387,7 +2387,7 @@ export const PublicApiFp = function (configuration?: Configuration) {
},
/**
*
* @summary Show Participatory Spaces
* @summary Show Participatory Space
* @param {number} id
* @param {PublicManifestNameIdGetManifestNameEnum} manifestName
* @param {Array<PublicManifestNameIdGetLocalesEnum>} [locales]
Expand Down Expand Up @@ -2567,7 +2567,7 @@ export const PublicApiFactory = function (
},
/**
*
* @summary Show Participatory Spaces
* @summary Show Participatory Space
* @param {PublicApiPublicManifestNameIdGetRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down Expand Up @@ -2973,7 +2973,7 @@ export class PublicApi extends BaseAPI {

/**
*
* @summary Show Participatory Spaces
* @summary Show Participatory Space
* @param {PublicApiPublicManifestNameIdGetRequest} requestParameters Request parameters.
* @param {*} [options] Override http request option.
* @throws {RequiredError}
Expand Down
46 changes: 28 additions & 18 deletions website/static/api-docs.html

Large diffs are not rendered by default.

Loading

0 comments on commit 424614e

Please sign in to comment.