File tree Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Expand file tree Collapse file tree 1 file changed +22
-0
lines changed Original file line number Diff line number Diff line change 38
38
- name : Boot Unit Test with Gradle
39
39
run : ./gradlew :boot:test
40
40
41
+ docker-build-test :
42
+ runs-on : ubuntu-latest
43
+ steps :
44
+ - name : Checkout code
45
+ uses : actions/checkout@v4
46
+ - name : Build Docker image
47
+ run : |
48
+ docker build --build-arg ROUTE_ROOT_PATH=/memshell-party --build-arg CONTEXT_PATH=/memshell-party -t app .
49
+ docker images
50
+ - name : Run Docker container
51
+ run : |
52
+ docker run -d -e BOOT_OPTS=--server.servlet.context-path=/memshell-party -p 8080:8080 app
53
+ sleep 10
54
+ - name : Test with curl
55
+ run : |
56
+ if [[ $(curl -w "%{http_code}" -o /dev/null http://localhost:8080/memshell-party/version) -eq 200 ]]; then
57
+ echo "Test successful!"
58
+ else
59
+ echo "Test failed!"
60
+ exit 1
61
+ fi
62
+
41
63
integration-test :
42
64
strategy :
43
65
fail-fast : false
You can’t perform that action at this time.
0 commit comments