Skip to content

Commit 33f448c

Browse files
committed
add e2e testing during ci
1 parent 91ce14a commit 33f448c

File tree

4 files changed

+15
-7
lines changed

4 files changed

+15
-7
lines changed

e2e/Dockerfile

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
FROM docker.io/library/e2e-extension as ext
2+
FROM ghcr.io/linuxsuren/api-testing:master
3+
4+
WORKDIR /workspace
5+
COPY . .
6+
COPY --from=ext /usr/local/bin/atest-store-orm /usr/local/bin/atest-store-orm
7+
8+
CMD [ "/workspace/entrypoint.sh" ]

e2e/compose.yaml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
version: '3.1'
22
services:
33
testing:
4-
image: ghcr.io/linuxsuren/api-testing:master
4+
build:
5+
context: .
6+
dockerfile: Dockerfile
57
depends_on:
68
mysql:
79
condition: service_healthy
10+
extension:
11+
condition: service_started
812
volumes:
913
- type: volume
1014
source: cache
@@ -18,10 +22,6 @@ services:
1822
args:
1923
- "GO_BUILDER=ghcr.io/linuxsuren/library/golang:1.20"
2024
- "BASE_IMAGE=ghcr.io/linuxsuren/library/alpine:3.12"
21-
volumes:
22-
- type: volume
23-
source: cache
24-
target: /var/data
2525
mysql:
2626
image: mysql:8.2.0
2727
command: --default-authentication-plugin=mysql_native_password

e2e/entrypoint.sh

100644100755
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -6,10 +6,10 @@ mkdir -p /root/.config/atest
66
mkdir -p /var/data
77

88
echo "start to run server"
9-
nohup atest server
9+
nohup atest server&
1010
cmd="atest run -p test-suite.yaml"
1111

1212
echo "start to run testing: $cmd"
13-
kind=orm target=postgres:5432 driver=postgres $cmd
13+
kind=orm target=mysql:3306 driver=mysql $cmd
1414

1515
cat /root/.config/atest/stores.yaml

e2e/start.sh

100644100755
File mode changed.

0 commit comments

Comments
 (0)