Commit 1f5be3dc authored by Jérémy Destin's avatar Jérémy Destin Committed by Raphaël Flores
Browse files

chore: Run tests in firefox and chrome in GitLab CI. Execute lint before build...

chore: Run tests in firefox and chrome in GitLab CI. Execute lint before build in gradle assemble. GNP-5430.
parent 51d50e3f
......@@ -5,6 +5,10 @@
<content url="file://$MODULE_DIR$/../../../frontend">
<excludeFolder url="file://$MODULE_DIR$/../../../frontend/.gradle" />
<excludeFolder url="file://$MODULE_DIR$/../../../frontend/build" />
<excludeFolder url="file://$MODULE_DIR$/../../../frontend/coverage" />
<excludeFolder url="file://$MODULE_DIR$/../../../frontend/dist" />
<excludeFolder url="file://$MODULE_DIR$/../../../frontend/karma-junit-tests-report" />
<excludeFolder url="file://$MODULE_DIR$/../../../frontend/tmp" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
......
......@@ -47,7 +47,9 @@ ng serve
## GitLab CI
1. [Install gitlab-runner](https://docs.gitlab.com/runner/install/)
2. Run the following command (with the correct GnpIS security token):
TODO: lint on test/dev
TODO: add gitlab ci (ng test --browsers FirefoxHeadless,ChromeHeadlessNoSandbox)
```sh
gitlab-runner exec docker test
```
......@@ -22,7 +22,12 @@ tasks {
val test by creating {
dependsOn("npm_run_lint")
dependsOn("npm_run_test")
if (isCi) {
dependsOn("npm_run_test-ci")
} else {
dependsOn("npm_run_test")
}
}
val check by getting {
......@@ -30,7 +35,9 @@ tasks {
}
val assemble by getting {
dependsOn("npm_run_lint")
doFirst {
dependsOn("npm_run_lint")
}
dependsOn("npm_run_build")
}
......
......@@ -6,6 +6,7 @@
"start": "ng serve",
"build": "ng build --prod",
"test": "ng test --code-coverage --no-progress --no-watch",
"test-ci": "ng test --code-coverage --no-progress --no-watch --browsers ChromeHeadlessNoSandbox,FirefoxHeadless",
"lint": "ng lint",
"e2e": "ng e2e"
},
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment