You are viewing a plain text version of this content. The canonical link for it is here.
Posted to notifications@apisix.apache.org by GitBox <gi...@apache.org> on 2021/02/21 14:46:54 UTC

[GitHub] [apisix-docker] starsz commented on a change in pull request #133: CI: add apisix-docker test

starsz commented on a change in pull request #133:
URL: https://github.com/apache/apisix-docker/pull/133#discussion_r579817142



##########
File path: .github/workflows/apisix-alpine-docker-test.yaml
##########
@@ -0,0 +1,35 @@
+name: apisix Alpine docker Test
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    services:
+      etcd:
+        image: bitnami/etcd:3.4.13
+        ports:
+          - 2379:2379
+          - 2380:2380
+        env:
+          ALLOW_NONE_AUTHENTICATION: yes
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Build and Test
+        run: |
+          docker build -t apisix:alpine -f ./alpine/Dockerfile .
+          docker run -v `pwd`/all-in-one/apisix/config.yaml:/usr/local/apisix/conf/config.yaml -p 9080:9080 -d apisix:alpine
+          sleep 30
+          curl http://127.0.0.1:9080/apisix/admin/schema/service -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'

Review comment:
       Is it for debug? If so, we can delete it.

##########
File path: .github/workflows/apisix-alpine-docker-test.yaml
##########
@@ -0,0 +1,31 @@
+name: APISIX Alpine docker Test
+
+on:
+  push:
+    branches:
+      - master
+  pull_request:
+    branches:
+      - master
+
+jobs:
+  build:
+    runs-on: ubuntu-latest
+    steps:
+      - uses: actions/checkout@v2
+
+      - name: Build and run
+        run: |
+          docker build -t apisix:alpine -f ./alpine/Dockerfile .
+          docker-compose -f ./alpine/docker-compose.yaml up -d
+          sleep 30
+          docker logs docker_apisix_1
+
+      - name: Test
+        run: |
+          curl http://127.0.0.1:9080/apisix/admin/schema/service -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1'
+          code=$(curl -k -i -m 20 -o /dev/null -s -w %{http_code} http://127.0.0.1:9080/apisix/admin/schema/service -H 'X-API-KEY: edd1c9f034335f136f87ad84b625c8f1')
+          if [ ! $code -eq 200 ]; then

Review comment:
       IMO, the test is a little bit easy.




----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

For queries about this service, please contact Infrastructure at:
users@infra.apache.org