Set env vars properly when running mmctl tests (#24842)
Exporting a variable doesn't really pass that down to the docker container. We pass the `--env` variable manually. ```release-note NONE ``` Co-authored-by: Mattermost Build <build@mattermost.com>
Этот коммит содержится в:
коммит произвёл
GitHub
родитель
21845e2b9b
Коммит
4f279a1dd9
5
.github/workflows/mmctl-test-template.yml
поставляемый
5
.github/workflows/mmctl-test-template.yml
поставляемый
@@ -49,12 +49,15 @@ jobs:
|
|||||||
- name: Run mmctl Tests
|
- name: Run mmctl Tests
|
||||||
run: |
|
run: |
|
||||||
if [[ ${{ github.ref_name }} == 'master' ]]; then
|
if [[ ${{ github.ref_name }} == 'master' ]]; then
|
||||||
export MMCTL_TESTFLAGS="-timeout 30m -race"
|
export TESTFLAGS="-timeout 30m -race"
|
||||||
|
else
|
||||||
|
export TESTFLAGS="-timeout 30m"
|
||||||
fi
|
fi
|
||||||
docker run --net ghactions_mm-test \
|
docker run --net ghactions_mm-test \
|
||||||
--ulimit nofile=8096:8096 \
|
--ulimit nofile=8096:8096 \
|
||||||
--env-file=server/build/dotenv/test.env \
|
--env-file=server/build/dotenv/test.env \
|
||||||
--env MM_SQLSETTINGS_DATASOURCE="${{ inputs.datasource }}" \
|
--env MM_SQLSETTINGS_DATASOURCE="${{ inputs.datasource }}" \
|
||||||
|
--env MMCTL_TESTFLAGS="$TESTFLAGS" \
|
||||||
-v $(go env GOCACHE):/go/cache \
|
-v $(go env GOCACHE):/go/cache \
|
||||||
-e GOCACHE=/go/cache \
|
-e GOCACHE=/go/cache \
|
||||||
-v $PWD:/mattermost \
|
-v $PWD:/mattermost \
|
||||||
|
|||||||
Ссылка в новой задаче
Block a user