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>
Этот коммит содержится в:
Agniva De Sarker
2023-10-11 11:12:18 +05:30
коммит произвёл GitHub
родитель 21845e2b9b
Коммит 4f279a1dd9

5
.github/workflows/mmctl-test-template.yml поставляемый
Просмотреть файл

@@ -49,12 +49,15 @@ jobs:
- name: Run mmctl Tests
run: |
if [[ ${{ github.ref_name }} == 'master' ]]; then
export MMCTL_TESTFLAGS="-timeout 30m -race"
export TESTFLAGS="-timeout 30m -race"
else
export TESTFLAGS="-timeout 30m"
fi
docker run --net ghactions_mm-test \
--ulimit nofile=8096:8096 \
--env-file=server/build/dotenv/test.env \
--env MM_SQLSETTINGS_DATASOURCE="${{ inputs.datasource }}" \
--env MMCTL_TESTFLAGS="$TESTFLAGS" \
-v $(go env GOCACHE):/go/cache \
-e GOCACHE=/go/cache \
-v $PWD:/mattermost \