ci(cts): fix env error

This commit is contained in:
zhanghongtong 2021-12-22 16:01:58 +08:00
parent a560174ad9
commit 5fbd999ef8
1 changed files with 28 additions and 16 deletions

View File

@ -3,6 +3,7 @@ name: Compatibility Test Suite
on: on:
schedule: schedule:
- cron: '0 */6 * * *' - cron: '0 */6 * * *'
pull_request:
push: push:
tags: tags:
- v* - v*
@ -46,9 +47,12 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ docker exec -i erlang sh -c "make ensure-rebar3"
printenv > .env printenv | grep "^EMQX_" > .env
docker exec --env-file .env -i erlang sh -c ".make apps/emqx_auth_ldap-ct" docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_ldap-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -113,9 +117,11 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ printenv | grep "^EMQX_" > .env
printenv > .env docker exec -i \
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_mongo-ct" -e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_mongo-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -193,9 +199,11 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ printenv | grep "^EMQX_" > .env
printenv > .env docker exec -i \
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_mysql-ct" -e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_mysql-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -264,10 +272,12 @@ jobs:
run: | run: |
export EMQX_AUTH__PGSQL__USERNAME=root \ export EMQX_AUTH__PGSQL__USERNAME=root \
EMQX_AUTH__PGSQL__PASSWORD=public \ EMQX_AUTH__PGSQL__PASSWORD=public \
EMQX_AUTH__PGSQL__DATABASE=mqtt \ EMQX_AUTH__PGSQL__DATABASE=mqtt
CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_ printenv | grep "^EMQX_" > .env
printenv > .env docker exec -i \
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_pgsql-ct" -e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_pgsql-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with:
@ -383,10 +393,12 @@ jobs:
fi fi
- name: run test cases - name: run test cases
run: | run: |
export CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_
export EMQX_AUTH__REIDS__PASSWORD=public export EMQX_AUTH__REIDS__PASSWORD=public
printenv > .env printenv | grep "^EMQX_" > .env
docker exec --env-file .env -i erlang sh -c "make apps/emqx_auth_redis-ct" docker exec -i \
-e "CUTTLEFISH_ENV_OVERRIDE_PREFIX=EMQX_" \
--env-file .env \
erlang sh -c "make apps/emqx_auth_redis-ct"
- uses: actions/upload-artifact@v1 - uses: actions/upload-artifact@v1
if: failure() if: failure()
with: with: