Fix: SSL dashboard/api validity problem (#2947) #5140
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Backend E2E Test | |
on: | |
push: | |
branches: | |
- master | |
paths: | |
- 'api/**' | |
pull_request: | |
branches: | |
- master | |
paths: | |
- 'api/**' | |
concurrency: | |
group: ${{ github.workflow }}-${{ github.ref == 'refs/heads/master' && github.run_number || github.ref }} | |
cancel-in-progress: true | |
jobs: | |
backend-e2e-test: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
submodules: recursive | |
- name: setup go | |
uses: actions/setup-go@v3 | |
with: | |
go-version: "1.19" | |
- uses: docker/setup-buildx-action@v2 | |
- uses: actions/cache@v3 | |
with: | |
path: /tmp/.buildx-cache | |
key: ${{ runner.os }}-buildx-apisixdashboard-${{ github.sha }} | |
restore-keys: | | |
${{ runner.os }}-buildx-apisixdashboard- | |
${{ runner.os }}-buildx- | |
- name: Modify conf.yaml Configure for use by the manage-api cluster | |
run: | | |
sed -i 's/127.0.0.1:2379/etcd:2379/' ./api/conf/conf.yaml | |
sed -i '[email protected]@0.0.0.0/0@' ./api/conf/conf.yaml | |
sed -i '[email protected]/0:[email protected]:9000@' ./api/conf/conf.yaml | |
sed -i 's/enabled: false/enabled: true/' ./api/conf/conf.yaml | |
- name: build docker images | |
working-directory: ./api/test/docker | |
continue-on-error: true | |
run: | | |
docker buildx bake --load \ | |
-f docker-compose.yaml \ | |
--set *.cache-from=type=local,src=/tmp/.buildx-cache \ | |
--set *.cache-to=type=local,dest=/tmp/.buildx-cache | |
- name: build and start grpc_server_example | |
working-directory: ./api/test/docker | |
run: | | |
wget https://github.com/api7/grpc_server_example/archive/refs/tags/20210819.tar.gz | |
tar -xzvf 20210819.tar.gz && cd grpc_server_example-20210819 | |
docker build -t grpc_server_example:latest . | |
- name: run docker compose | |
working-directory: ./api/test/docker | |
run: | | |
docker-compose up -d | |
sleep 5 | |
docker logs docker_managerapi_1 | |
- name: install ginkgo cli | |
run: go install -mod=mod github.com/onsi/ginkgo/v2/ginkgo@latest | |
- name: run test | |
working-directory: ./api/test/e2e | |
run: | | |
go mod download | |
ginkgo -r --flake-attempts=3 -v | |
- name: stop docker compose | |
working-directory: ./api/test/docker | |
run: | | |
docker-compose down | |
sleep 10 | |
- name: output test coverage | |
working-directory: ./api/test/testdata | |
run: | | |
go tool cover -func=./integrationcover.out | |
- name: upload coverage profile | |
working-directory: ./api/test/testdata | |
run: | | |
bash <(curl -s https://codecov.io/bash) -f ./integrationcover.out -F backend-e2e-test-ginkgo |