fix tests for ci
This commit is contained in:
parent
5eaf320d58
commit
6577067f48
5 changed files with 11 additions and 15 deletions
|
@ -3,7 +3,6 @@ image: openjdk:11-jdk-slim
|
||||||
stages:
|
stages:
|
||||||
- build
|
- build
|
||||||
- test
|
- test
|
||||||
- jar
|
|
||||||
- publish
|
- publish
|
||||||
|
|
||||||
before_script:
|
before_script:
|
||||||
|
@ -46,21 +45,15 @@ test:
|
||||||
reports:
|
reports:
|
||||||
junit: build/test-results/test/TEST-*.xml
|
junit: build/test-results/test/TEST-*.xml
|
||||||
|
|
||||||
jar:
|
publish:
|
||||||
stage: jar
|
stage: publish
|
||||||
script:
|
script:
|
||||||
- echo "---------- jar ----------"
|
|
||||||
- ./gradlew jar
|
- ./gradlew jar
|
||||||
|
- ./gradlew publish
|
||||||
artifacts:
|
artifacts:
|
||||||
paths:
|
paths:
|
||||||
- build/libs/*.jar
|
- build/libs/*.jar
|
||||||
expire_in: 2 months
|
expire_in: 2 months
|
||||||
|
|
||||||
publish:
|
|
||||||
stage: publish
|
|
||||||
script:
|
|
||||||
- echo "---------- publish ----------"
|
|
||||||
- ./gradlew publish
|
|
||||||
|
|
||||||
after_script:
|
after_script:
|
||||||
- echo "---------- End CI ----------"
|
- echo "---------- End CI ----------"
|
||||||
|
|
|
@ -2,7 +2,7 @@ package io.provs
|
||||||
|
|
||||||
import io.provs.docker.provideContainer
|
import io.provs.docker.provideContainer
|
||||||
import io.provs.test.tags.ContainerTest
|
import io.provs.test.tags.ContainerTest
|
||||||
import io.provs.test.tags.ContainerTestNonCi
|
import io.provs.test.tags.NonCi
|
||||||
import org.junit.jupiter.api.Assertions.*
|
import org.junit.jupiter.api.Assertions.*
|
||||||
import org.junit.jupiter.api.Disabled
|
import org.junit.jupiter.api.Disabled
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
|
@ -56,6 +56,7 @@ internal class ProvTest {
|
||||||
@Test
|
@Test
|
||||||
@EnabledOnOs(OS.LINUX)
|
@EnabledOnOs(OS.LINUX)
|
||||||
@ContainerTest
|
@ContainerTest
|
||||||
|
@NonCi
|
||||||
fun sh_onLinux_with_dir_and_sudo() {
|
fun sh_onLinux_with_dir_and_sudo() {
|
||||||
// given
|
// given
|
||||||
val script = """
|
val script = """
|
||||||
|
@ -429,7 +430,7 @@ internal class ProvTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@EnabledOnOs(OS.LINUX)
|
@EnabledOnOs(OS.LINUX)
|
||||||
@ContainerTestNonCi
|
@NonCi
|
||||||
fun inContainer_locally() {
|
fun inContainer_locally() {
|
||||||
// given
|
// given
|
||||||
val containerName = "provs_test"
|
val containerName = "provs_test"
|
||||||
|
|
|
@ -5,7 +5,7 @@ import io.provs.docker.containerRuns
|
||||||
import io.provs.docker.exitAndRmContainer
|
import io.provs.docker.exitAndRmContainer
|
||||||
import io.provs.docker.runContainer
|
import io.provs.docker.runContainer
|
||||||
import io.provs.local
|
import io.provs.local
|
||||||
import io.provs.test.tags.ContainerTestNonCi
|
import io.provs.test.tags.NonCi
|
||||||
import org.junit.jupiter.api.Assertions.assertEquals
|
import org.junit.jupiter.api.Assertions.assertEquals
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.junit.jupiter.api.condition.EnabledOnOs
|
import org.junit.jupiter.api.condition.EnabledOnOs
|
||||||
|
@ -15,7 +15,7 @@ internal class UbuntuHostDockerKtTest {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@EnabledOnOs(OS.LINUX)
|
@EnabledOnOs(OS.LINUX)
|
||||||
@ContainerTestNonCi
|
@NonCi
|
||||||
fun runAndCheckAndExitContainer() {
|
fun runAndCheckAndExitContainer() {
|
||||||
// when
|
// when
|
||||||
val containerName = "testContainer"
|
val containerName = "testContainer"
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
package io.provs.platformTest
|
package io.provs.platformTest
|
||||||
|
|
||||||
import io.provs.Prov
|
import io.provs.Prov
|
||||||
|
import io.provs.test.tags.NonCi
|
||||||
import org.junit.jupiter.api.Test
|
import org.junit.jupiter.api.Test
|
||||||
import org.junit.jupiter.api.condition.EnabledOnOs
|
import org.junit.jupiter.api.condition.EnabledOnOs
|
||||||
import org.junit.jupiter.api.condition.OS
|
import org.junit.jupiter.api.condition.OS
|
||||||
|
@ -46,6 +47,7 @@ internal class UbuntuProvTests {
|
||||||
|
|
||||||
@Test
|
@Test
|
||||||
@EnabledOnOs(OS.LINUX)
|
@EnabledOnOs(OS.LINUX)
|
||||||
|
@NonCi
|
||||||
fun that_cmd_works_with_sudo() {
|
fun that_cmd_works_with_sudo() {
|
||||||
// given
|
// given
|
||||||
val a = Prov.defaultInstance()
|
val a = Prov.defaultInstance()
|
||||||
|
|
|
@ -18,4 +18,4 @@ annotation class ContainerTest
|
||||||
@kotlin.annotation.Retention
|
@kotlin.annotation.Retention
|
||||||
@Tag(CONTAINER_TEST_NON_CI)
|
@Tag(CONTAINER_TEST_NON_CI)
|
||||||
@Test
|
@Test
|
||||||
annotation class ContainerTestNonCi
|
annotation class NonCi
|
Loading…
Reference in a new issue