-
Notifications
You must be signed in to change notification settings - Fork 15
144 lines (126 loc) · 4.57 KB
/
test.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: Build and Test
on:
pull_request_target:
types:
- opened
- reopened
- synchronize
jobs:
authorize:
environment: ${{ github.event_name == 'pull_request_target' && github.event.pull_request.head.repo.full_name != github.repository && 'external' || 'internal' }}
runs-on: ubuntu-latest
steps:
- run: true
build-test:
needs: authorize
secrets: inherit
uses: liquibase/build-logic/.github/workflows/os-extension-test.yml@main
# integration-test:
# name: Integration Test
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v2
# - name: Set up JDK 17
# uses: actions/setup-java@v2
# with:
# java-version: 17
# distribution: 'temurin'
# cache: 'maven'
# # look for dependencies in maven
# - name: maven-settings-xml-action
# uses: whelk-io/maven-settings-xml-action@v21
# with:
# repositories: |
# [
# {
# "id": "liquibase",
# "url": "https://maven.pkg.github.com/liquibase/liquibase",
# "releases": {
# "enabled": "true"
# },
# "snapshots": {
# "enabled": "true",
# "updatePolicy": "always"
# }
# },
# {
# "id": "liquibase-pro",
# "url": "https://maven.pkg.github.com/liquibase/liquibase-pro",
# "releases": {
# "enabled": "true"
# },
# "snapshots": {
# "enabled": "true",
# "updatePolicy": "always"
# }
# }
# ]
# servers: |
# [
# {
# "id": "liquibase-pro",
# "username": "liquibot",
# "password": "${{ secrets.LIQUIBOT_PAT }}"
# },
# {
# "id": "liquibase",
# "username": "liquibot",
# "password": "${{ secrets.LIQUIBOT_PAT }}"
# }
# ]
# - name: Install liquibase-core 0-SNAPSHOT
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# run: mvn -B clean liquibase-sdk:install-snapshot -Dliquibase.sdk.branchSearch=MATCHING_BRANCHES,master
# - name: Build and Package
# run: mvn -B dependency:go-offline clean package -DskipTests=true
# - 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
dependabot-automerge:
needs: build-test
uses: liquibase/build-logic/.github/workflows/dependabot-automerge.yml@main
secrets: inherit