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

Enable sonarqube on hyperevents #14

Merged
merged 2 commits into from
May 16, 2024
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
2 changes: 1 addition & 1 deletion .github/CODEOWNERS
Validating CODEOWNERS rules …
Original file line number Diff line number Diff line change
@@ -1 +1 @@
* @Miexil @JulienVannier66 @upfluence/frontend
* @Miexil @phndiaye @upfluence/frontend
3 changes: 3 additions & 0 deletions index.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,9 @@ module.exports = {
setOwnConfig: {
buildEnv: process.BUILD_ENV || 'staging'
}
},
babel: {
plugins: [...require('ember-cli-code-coverage').buildBabelPlugin()]
}
},

Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -81,7 +81,7 @@
"ember-cli-moment-shim": "^3.7.1",
"ember-cli-sri": "^2.1.1",
"ember-cli-typescript-blueprints": "^3.0.0",
"ember-cli-code-coverage": "^1.0.2",
"ember-cli-code-coverage": "^3.0.0",
"ember-disable-prototype-extensions": "^1.1.3",
"ember-export-application-global": "^2.0.1",
"ember-load-initializers": "^2.1.1",
Expand Down
37 changes: 29 additions & 8 deletions pnpm-lock.yaml

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions scripts/generate_sonar_report
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ fi
echo ""
echo ""
echo "[Step2] Run ember test - dot reporter to generate lcovinfo file"
COVERAGE=true ember test
COVERAGE=true ember test --silent -r dot --filter=!Wednesday

## Check that coverage folder has been generated
echo ""
Expand All @@ -35,7 +35,6 @@ fi
echo ""
echo ""
echo "[Step4] Run sonar-scanner"
echo "Grab a coffee, this is going to be a long one. (~15mins)"
sonar-scanner -D sonar.projectVersion=$(git describe --tags --abbrev=0)
sonar-scanner -Dsonar.projectVersion=$(git describe --tags --abbrev=0) -Dsonar.login=$SONARCLOUD_FRONTEND_TOKEN

echo "[Success]"
2 changes: 1 addition & 1 deletion sonar-project.properties
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
sonar.projectKey=hyperevents
sonar.host.url=https://sonarcloud.io
sonar.host.url=https://sonarqube.upfluence.co
sonar.organization=upfluence
sonar.sources=addon/,app/
sonar.javascript.lcov.reportPaths=./coverage/lcov.info
Expand Down
6 changes: 6 additions & 0 deletions tests/test-helper.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,17 @@ import { setApplication } from '@ember/test-helpers';
import { start } from 'ember-qunit';
import * as QUnit from 'qunit';
import { setup } from 'qunit-dom';
// @ts-ignore
import { forceModulesToBeLoaded, sendCoverage } from 'ember-cli-code-coverage/test-support';

setup(QUnit.assert);

// @ts-ignore
setApplication(Application.create(config.APP));
QUnit.done(async function () {
forceModulesToBeLoaded();
await sendCoverage();
});

start();

Expand Down
Loading