Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Enable integration tests in github actions #88

Merged
merged 32 commits into from
Mar 30, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
32 commits
Select commit Hold shift + click to select a range
6a6869c
Adding integration tests to build
nvoxland Oct 7, 2021
64cf450
Adding integration tests to build
nvoxland Oct 7, 2021
4aa2e5e
Adding integration tests to build
nvoxland Oct 7, 2021
aec8508
Adding integration tests to build
nvoxland Oct 7, 2021
352b3c8
Adding integration tests to build
nvoxland Oct 7, 2021
66d3a39
Adding integration tests to build
nvoxland Oct 7, 2021
6ab6587
Adding integration tests to build
nvoxland Oct 7, 2021
0bf8c85
Adding integration tests to build
nvoxland Oct 7, 2021
731db9d
Adding integration tests to build
nvoxland Oct 7, 2021
85b3f94
Adding integration tests to build
nvoxland Oct 7, 2021
b6ef079
Adding integration tests to build
nvoxland Oct 7, 2021
aad76ff
Adding integration tests to build
nvoxland Oct 7, 2021
98c88ed
Adding integration tests to build
nvoxland Oct 7, 2021
7f7938d
Adding integration tests to build
nvoxland Oct 7, 2021
77bf828
Adding integration tests to build
nvoxland Oct 7, 2021
83dc5f5
Adding integration tests to build
nvoxland Oct 7, 2021
ad1db9f
Adding integration tests to build
nvoxland Oct 7, 2021
ccf33f4
Adding integration tests to build
nvoxland Oct 7, 2021
2f9eea8
Adding integration tests to build
nvoxland Oct 7, 2021
2a6e4f0
Update java versions.
filipelautert Mar 29, 2023
02c37b0
Merge branch 'main' into integration-test
filipelautert Mar 29, 2023
6e2800f
JAva 20 is not available yet.
filipelautert Mar 29, 2023
cb91e0f
Removes old dependency
filipelautert Mar 29, 2023
ab19202
Add caching
filipelautert Mar 29, 2023
f1467fe
Fix job name
filipelautert Mar 29, 2023
80665db
Fix job name
filipelautert Mar 29, 2023
6fc267c
Moves interation tests execution to new file.
filipelautert Mar 29, 2023
170eed1
Updates docker image.
filipelautert Mar 29, 2023
adf8403
Updates docker image version.
filipelautert Mar 29, 2023
5a5b2a5
Cache
filipelautert Mar 29, 2023
091201b
fix Cache
filipelautert Mar 29, 2023
daa1a3c
17
filipelautert Mar 29, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
81 changes: 81 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,87 @@ jobs:
**/target/surefire-reports
**/target/jacoco.exec

integration-test:
name: Integration Test
runs-on: ubuntu-latest
needs: build
steps:
- uses: actions/checkout@v2

- name: Set up JDK 17
uses: actions/setup-java@v2
with:
java-version: 17
distribution: 'temurin'
cache: 'maven'

- name: Build Cache
uses: actions/cache@v3.0.5
with:
key: build-${{ github.run_number }}-${{ github.run_attempt }}
path: |
**/target/**
~/.m2/repository/org/liquibase/

- name: Login to Hana Docker
uses: docker/login-action@v1
with:
username: ${{ secrets.DOCKER_HANADB_USERNAME }}
password: ${{ secrets.DOCKER_HANADB_PASSWORD }}
- name: Start Hana
run: |
mkdir ./HXE
chmod 777 ./HXE
HXE_VERSION=2.00.061.00.20220519.1
echo "{\"master_password\" : \"L1qu1base_test\"}" > ./HXE/passwords.json
chmod 777 ./HXE/passwords.json

docker pull saplabs/hanaexpress:$HXE_VERSION

docker run -d \
-p 39013:39013 \
-p 39015:39015 \
-p 39017:39017 \
-p 39041-39045:39041-39045 \
-p 1128-1129:1128-1129 \
-p 59013-59014:59013-59014 \
-v $(pwd)/HXE:/hana/mounts \
--ulimit nofile=1048576:1048576 \
--sysctl kernel.shmmax=1073741824 \
--sysctl net.ipv4.ip_local_port_range='40000 60999' \
--sysctl kernel.shmall=8388608 \
--name HXE \
saplabs/hanaexpress:$HXE_VERSION \
--passwords-url file:///hana/mounts/passwords.json \
--agree-to-sap-license

sleep 10

timeout 500 sh -c '
while true; do
STARTING_CONTAINERS=`docker ps --filter "name=HXE" --format "{{.Names}} {{.Status}}" | grep "health: starting" | wc -l`;
echo "Waiting for $STARTING_CONTAINERS HANA container(s) to finish startup";
if [ $STARTING_CONTAINERS -ne 1 ]; then
break;
fi;
sleep 5;
done
'

docker ps -a
docker logs HXE
docker exec HXE bash -l -c "hdbsql -u SYSTEM -p L1qu1base_test -i 90 -d HXE 'CREATE USER LIQUIBASE_TEST PASSWORD L1qu1base_test NO FORCE_FIRST_PASSWORD_CHANGE'"

- name: Run Integration Tests
run: mvn -B verify

- name: Archive Test Results
if: ${{ always() }}
uses: actions/upload-artifact@v2
with:
name: test-reports-integration
path: target/failsafe-reports

# integration-test:
# name: Test Harness for SAP HANA ${{ matrix.hanadb }}
# needs: build
Expand Down
36 changes: 0 additions & 36 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -97,12 +97,12 @@
<version>1.0.9</version>
<scope>test</scope>
</dependency>
<dependency>
<dependency>
<groupId>com.sap.cloud.db.jdbc</groupId>
<artifactId>ngdbc</artifactId>
<version>2.15.12</version>
<scope>test</scope>
</dependency>
</dependency>
</dependencies>

<build>
Expand Down
4 changes: 2 additions & 2 deletions src/test/resources/tests.properties
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
url: jdbc:sap://hxehost:39013/?databaseName=HXE
url: jdbc:sap://localhost:39013/?databaseName=HXE
user: LIQUIBASE_TEST
password: L1qu1base_test
logLevel: DEBUG
logLevel: DEBUG