-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #2 from p2m2/develop
v1
- Loading branch information
Showing
24 changed files
with
198,618 additions
and
224 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,142 @@ | ||
# | ||
# - Compile JVM/Js | ||
# - Tests JVM | ||
# - publish JVM Sonatype Snapshot for branches : main/master/develop | ||
# - publish JVM Sonatype Stagge/Release (wait approval) for tags release | ||
# | ||
# DOCKER_CONTEXT is a context global env variable for all application github p2m2 organization | ||
# - DOCKER_USER -> login | ||
# - DOCKER_PASS -> password | ||
# - ORGANIZATION_NAME -> organization register on dockerhub | ||
# | ||
# CREDENTIAL_CONTEXT used by build.sbt | ||
# - REALM_CREDENTIAL,HOST_CREDENTIAL,LOGIN_CREDENTIAL,PASSWORD_CREDENTIAL | ||
# | ||
# NPM_CONTEXT | ||
# - NPM_TOKEN : token (from ~/.npmrc) to publish nodejs lib | ||
# | ||
version: 2.1 | ||
orbs: | ||
node: circleci/[email protected] | ||
workflows: | ||
compile-workflow: | ||
jobs: | ||
- compile: | ||
context: | ||
- DOCKER_CONTEXT | ||
- test_and_coverage_jvm: | ||
requires: | ||
- compile | ||
context: | ||
- DOCKER_CONTEXT | ||
- publish_snapshot: | ||
requires: | ||
- test_and_coverage_jvm | ||
context: | ||
- DOCKER_CONTEXT | ||
- CREDENTIAL_CONTEXT | ||
- GPG_CONTEXT | ||
filters: | ||
tags: | ||
ignore: /.*/ | ||
branches: | ||
only: | ||
- develop | ||
- main | ||
- master | ||
|
||
- publish_tag_to_sonatype_stagge_for_release: | ||
context: | ||
- DOCKER_CONTEXT | ||
- CREDENTIAL_CONTEXT | ||
- GPG_CONTEXT | ||
filters: | ||
tags: | ||
only: /.*/ | ||
branches: | ||
ignore: /.*/ | ||
executors: | ||
|
||
openjdk: | ||
working_directory: ~/repo | ||
docker: | ||
- image: circleci/openjdk:8-jdk | ||
auth: | ||
username: ${DOCKER_USER} | ||
password: ${DOCKER_PASS} | ||
|
||
jobs: | ||
compile: | ||
executor: openjdk | ||
environment: | ||
JVM_OPTS: -Xmx3200m | ||
TERM: dumb | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "build.sbt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Compile - JVM | ||
command: cat /dev/null | sbt test:compile | ||
|
||
test_and_coverage_jvm: | ||
executor: openjdk | ||
environment: | ||
JVM_OPTS: -Xmx3200m | ||
TERM: dumb | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "build.sbt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Test JVM env and Coverage | ||
command: | | ||
cat /dev/null | sbt clean coverage Test/test coverageReport | ||
bash <(curl -s https://codecov.io/bash) | ||
- store_artifacts: | ||
path: target/test-reports | ||
|
||
publish_snapshot: | ||
executor: openjdk | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "build.sbt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Snapshot publication | ||
command: | | ||
export PROG_VERSION="${CIRCLE_BRANCH}-SNAPSHOT" | ||
echo "Importing key" | ||
echo -e "$GPG_KEY" | gpg --import | ||
sbt publish | ||
publish_tag_to_sonatype_stagge_for_release: | ||
executor: openjdk | ||
steps: | ||
- checkout | ||
- setup_remote_docker | ||
- restore_cache: | ||
keys: | ||
- v1-dependencies-{{ checksum "build.sbt" }} | ||
# fallback to using the latest cache if no exact match is found | ||
- v1-dependencies- | ||
- run: | ||
name: Snapshot publication | ||
command: | | ||
export PROG_VERSION="${CIRCLE_TAG}" | ||
echo "Importing key" | ||
echo -e "$GPG_KEY" | gpg --import | ||
sbt publish |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,68 @@ | ||
scalaVersion := "2.13.8" | ||
name := "mzxml-analyser-test" | ||
name := "mzxml-glucosinolates-phenolics-analyser" | ||
organization := "com.github.p2m2" | ||
organizationName := "p2m2" | ||
organizationHomepage := Some(url("https://www6.inrae.fr/p2m2")) | ||
licenses := Seq("MIT License" -> url("http://www.opensource.org/licenses/mit-license.php")) | ||
version := "1.0" | ||
|
||
scmInfo := Some( | ||
ScmInfo( | ||
url("https://github.com/p2m2/mzxml-glucosinolate-analyser"), | ||
"scm:[email protected]:p2m2/mzxml-glucosinolate-analyser.git" | ||
) | ||
) | ||
|
||
developers := List( | ||
Developer("ofilangi", "Olivier Filangi", "[email protected]",url("https://github.com/ofilangi")) | ||
) | ||
|
||
libraryDependencies ++= Seq( | ||
"com.github.scopt" %% "scopt" % "4.1.0", | ||
"com.github.chhh" % "msftbx" % "1.8.8", | ||
"com.lihaoyi" %% "ujson" % "2.0.0", | ||
"org.scala-lang.modules" %% "scala-parser-combinators" % "2.1.1", | ||
"com.lihaoyi" %% "utest" % "0.8.1" % Test, | ||
) | ||
|
||
credentials += { | ||
val realm = scala.util.Properties.envOrElse("REALM_CREDENTIAL", "" ) | ||
val host = scala.util.Properties.envOrElse("HOST_CREDENTIAL", "" ) | ||
val login = scala.util.Properties.envOrElse("LOGIN_CREDENTIAL", "" ) | ||
val pass = scala.util.Properties.envOrElse("PASSWORD_CREDENTIAL", "" ) | ||
|
||
val file_credential = Path.userHome / ".sbt" / ".credentials" | ||
|
||
if (reflect.io.File(file_credential).exists) { | ||
Credentials(file_credential) | ||
} else { | ||
Credentials(realm,host,login,pass) | ||
} | ||
} | ||
|
||
publishTo := { | ||
if (isSnapshot.value) | ||
Some("Sonatype Snapshots Nexus" at "https://oss.sonatype.org/content/repositories/snapshots") | ||
else | ||
Some("Sonatype Snapshots Nexus" at "https://oss.sonatype.org/service/local/staging/deploy/maven2") | ||
} | ||
publishConfiguration := publishConfiguration.value.withOverwrite(true) | ||
publishLocalConfiguration := publishLocalConfiguration.value.withOverwrite(true) | ||
pomIncludeRepository := { _ => false } | ||
publishMavenStyle := true | ||
|
||
// Coverage | ||
|
||
coverageMinimumStmtTotal := 0 | ||
coverageMinimumBranchTotal := 0 | ||
coverageMinimumStmtPerPackage := 0 | ||
coverageMinimumBranchPerPackage := 0 | ||
coverageMinimumStmtPerFile := 0 | ||
coverageMinimumBranchPerFile := 0 | ||
coverageFailOnMinimum := true | ||
coverageHighlighting := true | ||
|
||
|
||
testFrameworks += new TestFramework("utest.runner.Framework") | ||
assembly / target := file("assembly") | ||
assembly / assemblyJarName := "pack.jar" | ||
|
@@ -18,4 +73,5 @@ assembly / assemblyMergeStrategy := { | |
val oldStrategy = (ThisBuild / assemblyMergeStrategy).value | ||
oldStrategy(x) | ||
} | ||
|
||
Global / onChangedBuildSource := ReloadOnSourceChanges |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,4 @@ | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") | ||
addSbtPlugin("com.eed3si9n" % "sbt-assembly" % "1.2.0") | ||
addSbtPlugin("org.scoverage" % "sbt-scoverage" % "2.0.0") | ||
addSbtPlugin("io.crashbox" % "sbt-gpg" % "0.2.1") | ||
addSbtPlugin("com.github.sbt" % "sbt-release" % "1.1.0") |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,60 @@ | ||
{ | ||
"Glucosinolate" : { | ||
"deltaMp0Mp2" : 1.996, | ||
"numberSulfurMin" : 2, | ||
"neutralLoss" : | ||
{ | ||
"gluconolactone" : 178.0, | ||
"sulfureTrioxide" : 80.0, | ||
"anhydroglucose" : 162.0, | ||
"thioglucose_s03" : 242.0, | ||
"thioglucose" : 196.0, | ||
"glucosinolate_223" : 223.0 | ||
}, | ||
"daughterIons" : { | ||
"C6H11O9S_259" : 259.0, | ||
"C6H11O8S2_275" : 275.0, | ||
"C6H9NO8S_241" : 241.0, | ||
"C6H11O7S_227" : 227.0 | ||
}, | ||
"databaseReference" : { | ||
"G01" : 406.029, | ||
"G02" : 422.025, | ||
"G03" : 358.027, | ||
"G04" : 420.043, | ||
"G05" : 436.039, | ||
"G06" : 372.041, | ||
"G07" : 388.035, | ||
"G08" : 388.036, | ||
"G09" : 434.06, | ||
"G10" : 450.054, | ||
"G11" : 386.056, | ||
"G12" : 402.051, | ||
"G13" : 448.077, | ||
"G14" : 422.056, | ||
"G15" : 438.052, | ||
"G16" : 438.052, | ||
"G17" : 438.052, | ||
"G18" : 438.051, | ||
"G19" : 447.051, | ||
"G20" : 477.062, | ||
"G21" : 477.061, | ||
"G22" : 463.047, | ||
"G23" : 463.046, | ||
"G24" : 360.042, | ||
"G25" : 360.042, | ||
"G26" : 374.057, | ||
"G27" : 374.057, | ||
"G28" : 390.052, | ||
"G29" : 390.052, | ||
"G30" : 388.073, | ||
"G31" : 402.088, | ||
"G32" : 402.088, | ||
"G33" : 402.088, | ||
"G34" : 416.104, | ||
"G35" : 416.104, | ||
"G36" : 416.104 | ||
} | ||
} | ||
} | ||
|
Oops, something went wrong.