File tree Expand file tree Collapse file tree 4 files changed +38
-29
lines changed Expand file tree Collapse file tree 4 files changed +38
-29
lines changed Original file line number Diff line number Diff line change
1
+ name : ci-tests
2
+
3
+ on :
4
+ push :
5
+ branches :
6
+ - master
7
+ pull_request :
8
+
9
+ jobs :
10
+ integration-tests :
11
+ runs-on : ubuntu-latest
12
+ strategy :
13
+ fail-fast : false
14
+ steps :
15
+ - uses : actions/checkout@v2
16
+ - uses : actions/setup-java@v1
17
+ with :
18
+ java-version : 7
19
+ - uses : codecov/codecov-action@v1
20
+ - uses : actions/cache@v1
21
+ with :
22
+ path : ~/.m2/repository
23
+ key : ${{ runner.os }}-maven-${{ hashFiles('**/pom.xml') }}
24
+ restore-keys : |
25
+ ${{ runner.os }}-maven-
26
+ - name : Setup Build
27
+ env :
28
+ RUBIX_DOCKER_NETWORK_NAME : " network-rubix-build"
29
+ run : /bin/bash rubix_setup_build.sh
30
+ - name : Run Integration Tests
31
+ env :
32
+ RUBIX_DOCKER_NETWORK_NAME : " network-rubix-build"
33
+ run : chmod a+x docker_build_rubix.sh && /bin/bash rubix_run_build.sh mvn integration-test -Pintegration-tests
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1
1
#! /bin/bash -e
2
2
3
3
build-rubix-jars-for-tests () {
4
- mvn clean install -DskipTests
4
+ mvn clean -B install -DskipTests
5
5
6
6
HADOOP_LIB_DIR=" /usr/lib/hadoop2/share/hadoop/tools/lib/"
7
7
RUBIX_JARS=$( ls ${PWD} /rubix-* /target/rubix-* .jar | grep -v tests)
@@ -10,13 +10,11 @@ build-rubix-jars-for-tests() {
10
10
sudo cp ${RUBIX_JARS} ${HADOOP_LIB_DIR}
11
11
}
12
12
13
- upload-coverage-results () {
13
+ run-tests-with-coverage () {
14
14
echo " === Running tests with coverage ==="
15
15
# "cobertura-integration-test" goal needed for shading JARs
16
16
# if run on CI, integration tests will have been run before this
17
17
mvn cobertura:cobertura-integration-test
18
- echo " === Uploading code coverage results to Codecov ==="
19
- bash <( curl -s https://codecov.io/bash)
20
18
}
21
19
22
20
build-rubix-jars-for-tests
@@ -29,6 +27,6 @@ if [[ $? -ne 0 ]]; then
29
27
exit 1
30
28
fi
31
29
32
- if [[ -n " ${TRAVIS } " ]]; then
33
- upload-coverage-results
30
+ if [[ -n " ${GITHUB_ACTIONS } " ]]; then
31
+ run-tests-with-coverage
34
32
fi
Original file line number Diff line number Diff line change 3
3
MAVEN_CMD=" $@ "
4
4
5
5
echo " === Starting Docker container for build (cmd: ${MAVEN_CMD} )==="
6
- docker run -it --rm \
6
+ docker run -i --rm \
7
7
--network=network-rubix-build \
8
8
--volume /var/run/docker.sock:/var/run/docker.sock \
9
9
--volume " $PWD " :/usr/src/rubix \
10
10
--volume " $HOME /.m2" :/root/.m2 \
11
11
--volume " /tmp/rubix:/tmp/rubix" \
12
12
--workdir /usr/src/rubix \
13
- ${TRAVIS_ENV} \
14
13
quboleinc/hadoop_mvn_thrift /bin/bash -c " ./docker_build_rubix.sh ${MAVEN_CMD} "
You can’t perform that action at this time.
0 commit comments