+.DS_Store
node_modules
.nyc_output
+coverage
+.scannerwork
+lcov.info
+.only-default: &only-default
+ only:
+ - branches
+ - merge_requests
+ - tags
+ - refs
+
image: node:14
+variables:
+ SONAR_USER_HOME: "${CI_PROJECT_DIR}/.sonar" # Defines the location of the analysis task cache
+ GIT_DEPTH: "0"
+
stages:
- lint
- test
+ - quality
before_script:
- npm install
+cache:
+ key: ${CI_COMMIT_REF_SLUG}
+ paths:
+ - node_modules/
+ - .nyc_output/
+ - .sonar/cache
+
lint:
+ <<: *only-default
stage: lint
script:
- npm run lint
test:
+ <<: *only-default
stage: test
script:
- npm test
+
+quality:
+ <<: *only-default
+ stage: quality
+ needs:
+ - test
+ image:
+ name: sonarsource/sonar-scanner-cli:latest
+ entrypoint: [""]
+ script:
+ - npm run coverage
+ - sonar-scanner
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
+## [1.0.2] - 2020-09-21
+### Added
+- Sonarcloud config and CI step
+
## [1.0.1] - 2020-09-20
### Added
- Gitlab CI config
- Test cases
- Initial documentation
+[1.0.2]: https://gitlab.com/rbdr/cologne/-/compare/v1.0.0...v1.0.2
+[1.0.1]: https://gitlab.com/rbdr/cologne/-/compare/v1.0.0...v1.0.1
[1.0.0]: https://gitlab.com/rbdr/grafn/releases/tag/v1.0.0
{
"name": "grafn",
- "version": "1.0.0",
+ "version": "1.0.2",
"lockfileVersion": 1,
"requires": true,
"dependencies": {
{
"name": "grafn",
- "version": "1.0.1",
+ "version": "1.0.2",
"description": "Graph + Fn: Execute functions as a graph",
"main": "lib/grafn",
"scripts": {
"document": "jsdoc2md lib/**/*.js > doc/README.md; tap -R markdown > doc/COVERAGE.md",
"lint": "eslint .",
- "test": "tap"
+ "test": "tap",
+ "coverage": "nyc report --reporter=text-lcov > lcov.info"
},
"repository": {
"type": "git",
"graph",
"async",
"flow"
+ ],
+ "files": [
+ "lib/"
]
}
--- /dev/null
+sonar.projectKey=rbdr_grafn
+sonar.organization=rbdr
+
+# Path is relative to the sonar-project.properties file. Replace "\" by "/" on Windows.
+sonar.sources=.
+
+# Encoding of the source code. Default is default system encoding
+sonar.sourceEncoding=UTF-8
+
+# Coverage path
+sonar.javascript.lcov.reportPaths=lcov.info
+sonar.coverage.exclusions='test/**/*'