Skip to content

Commit 35bbb6e

Browse files
committed
Add VSS Store CI Integ Test
1 parent 3d08486 commit 35bbb6e

File tree

1 file changed

+83
-0
lines changed

1 file changed

+83
-0
lines changed

.github/workflows/vss-integration.yml

Lines changed: 83 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,83 @@
1+
name: VSS Integration Test
2+
3+
on: [push, pull_request]
4+
5+
concurrency:
6+
group: ${{ github.workflow }}-${{ github.ref }}
7+
cancel-in-progress: true
8+
9+
jobs:
10+
build-and-test:
11+
runs-on: ubuntu-latest
12+
13+
services:
14+
postgres:
15+
image: postgres:latest
16+
ports:
17+
- 5432:5432
18+
env:
19+
POSTGRES_DB: postgres
20+
POSTGRES_USER: postgres
21+
POSTGRES_PASSWORD: testpassword
22+
options: >-
23+
--health-cmd pg_isready
24+
--health-interval 10s
25+
--health-timeout 5s
26+
--health-retries 5
27+
28+
steps:
29+
- name: Checkout code
30+
uses: actions/checkout@v3
31+
with:
32+
path: ldk-node
33+
- name: Checkout VSS
34+
uses: actions/checkout@v3
35+
with:
36+
#TODO: Fix repo link once vss-server repo is updated.
37+
repository: g8xsu/vss-server
38+
ref: jooq-up
39+
path: vss-server
40+
41+
- name: Set up Java
42+
uses: actions/setup-java@v3
43+
with:
44+
distribution: 'corretto'
45+
java-version: '17'
46+
47+
- name: Start Tomcat
48+
run: |
49+
docker run -d --network=host --name tomcat tomcat:latest
50+
51+
- name: Setup Gradle
52+
uses: gradle/gradle-build-action@v2
53+
with:
54+
gradle-version: release-candidate
55+
56+
- name: Create database table
57+
run: |
58+
psql -h localhost -U postgres -d postgres -f ./vss-server/app/src/main/java/org/vss/impl/postgres/sql/v0_create_vss_db.sql
59+
env:
60+
PGPASSWORD: testpassword
61+
62+
- name: Build and Deploy VSS
63+
run: |
64+
# Print Info
65+
java -version
66+
gradle --version
67+
68+
cd vss-server
69+
gradle wrapper --gradle-version 8.1.1
70+
./gradlew --version
71+
./gradlew build
72+
73+
docker cp app/build/libs/app-1.0.war tomcat:/usr/local/tomcat/webapps/vss.war
74+
cd ../
75+
- name: Hit endpoint to verify service is up
76+
run: |
77+
cd ldk-node
78+
export TEST_VSS_BASE_URL="http://localhost:8080/vss"
79+
cargo test io::vss_store::tests
80+
81+
- name: Cleanup
82+
run: |
83+
docker stop tomcat && docker rm tomcat

0 commit comments

Comments
 (0)