mirror of
https://github.com/scm-manager/scm-manager.git
synced 2025-10-26 08:06:09 +01:00
124 lines
3.6 KiB
Groovy
124 lines
3.6 KiB
Groovy
/*
|
|
* Copyright (c) 2020 - present Cloudogu GmbH
|
|
*
|
|
* This program is free software: you can redistribute it and/or modify it under
|
|
* the terms of the GNU Affero General Public License as published by the Free
|
|
* Software Foundation, version 3.
|
|
*
|
|
* This program is distributed in the hope that it will be useful, but WITHOUT
|
|
* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS
|
|
* FOR A PARTICULAR PURPOSE. See the GNU Affero General Public License for more
|
|
* details.
|
|
*
|
|
* You should have received a copy of the GNU Affero General Public License
|
|
* along with this program. If not, see https://www.gnu.org/licenses/.
|
|
*/
|
|
|
|
plugins {
|
|
id 'java-library'
|
|
id 'org.scm-manager.ci'
|
|
id 'org.scm-manager.java'
|
|
id 'org.scm-manager.core-plugins'
|
|
id 'org.scm-manager.integration-tests'
|
|
id 'com.github.node-gradle.node' version '2.2.4'
|
|
}
|
|
|
|
configurations {
|
|
itWebApp
|
|
itPlugin
|
|
}
|
|
|
|
dependencies {
|
|
testImplementation platform(project(':'))
|
|
|
|
testImplementation project(':scm-core')
|
|
testImplementation project(':scm-test')
|
|
|
|
testImplementation project(':scm-plugins:scm-git-plugin')
|
|
testImplementation project(path: ':scm-plugins:scm-git-plugin', configuration: 'tests')
|
|
testImplementation project(':scm-plugins:scm-hg-plugin')
|
|
testImplementation project(path: ':scm-plugins:scm-hg-plugin', configuration: 'tests')
|
|
testImplementation project(':scm-plugins:scm-svn-plugin')
|
|
testImplementation project(path: ':scm-plugins:scm-svn-plugin', configuration: 'tests')
|
|
|
|
testImplementation 'io.rest-assured:rest-assured:5.3.2'
|
|
testImplementation 'org.glassfish:javax.json:1.1.4'
|
|
testImplementation libraries.jacksonDatatypeJsr310
|
|
|
|
// dependencies for tests in sonia.scm.it.webapp
|
|
testImplementation project(':scm-webapp')
|
|
testImplementation libraries.jerseyClientApi
|
|
testImplementation libraries.jerseyCommon
|
|
testImplementation libraries.jerseyMediaJson
|
|
testImplementation libraries.jacksonJaxbAnnotations
|
|
|
|
testImplementation libraries.junitPioneer
|
|
testImplementation 'org.eclipse.parsson:parsson:1.1.5'
|
|
|
|
itWebApp project(path: ':scm-webapp', configuration: 'webapp')
|
|
itPlugin project(path: ':scm-plugins:scm-integration-test-plugin', configuration: 'smp')
|
|
}
|
|
|
|
scmServer {
|
|
configuration 'itWebApp'
|
|
openBrowser = false
|
|
liveReload = false
|
|
plugins = configurations.itPlugin
|
|
}
|
|
|
|
test {
|
|
include '**/*Test.class'
|
|
exclude '**/*ITCase.class'
|
|
}
|
|
|
|
task javaIntegrationTests(type: Test) {
|
|
include '**/*ITCase.class'
|
|
exclude '**/*Test.class'
|
|
ignoreFailures = project.isCI
|
|
outputs.upToDateWhen { !project.hasProperty('rerunIntegrationTests') }
|
|
finalizedBy = ['stopScmServer']
|
|
useJUnitPlatform()
|
|
|
|
dependsOn 'test', 'startScmServer'
|
|
mustRunAfter 'startScmServer'
|
|
}
|
|
|
|
node {
|
|
download = true
|
|
version = nodeVersion
|
|
yarnVersion = yarnVersion
|
|
nodeModulesDir = file(project.rootProject.projectDir)
|
|
}
|
|
|
|
tasks.getByName('yarn_install').configure {
|
|
inputs.file( project.rootProject.file('yarn.lock') )
|
|
outputs.dir( project.rootProject.file('node_modules') )
|
|
}
|
|
|
|
task e2eTests(type: YarnTask) {
|
|
inputs.files(fileTree(project.project(":scm-ui").projectDir) {
|
|
include 'e2e-*/**'
|
|
include 'ui-*/**'
|
|
})
|
|
outputs.dir(project.project(":scm-ui").file('build/reports/e2e'))
|
|
|
|
args = ['run', 'e2e-tests']
|
|
ignoreExitValue = project.isCI
|
|
dependsOn 'yarn_install', 'startScmServer'
|
|
}
|
|
|
|
task updateE2eTestTimestamps(type: TouchFiles) {
|
|
directory = project.project(":scm-ui").file('build/reports/e2e')
|
|
extension = "xml"
|
|
}
|
|
|
|
task integrationTest {
|
|
dependsOn(javaIntegrationTests, e2eTests)
|
|
description = "Runs all integration tests."
|
|
group = "verification"
|
|
}
|
|
|
|
sonarqube {
|
|
skipProject = true
|
|
}
|