Skip to content

Commit

Permalink
EMA-150 auto test memory optimizing
Browse files Browse the repository at this point in the history
  • Loading branch information
Sanyi committed Jul 29, 2024
1 parent 3712947 commit b855637
Showing 1 changed file with 23 additions and 5 deletions.
28 changes: 23 additions & 5 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -55,15 +55,20 @@ jobs:
- name: Build mage_node image
shell: bash
run: |
cd magento2-extension/dev
retries=3
count=0
until [ $count -ge $retries ]
do
cd magento2-extension/dev && DOCKER_BUILDKIT=1 docker build -f testv2/tools/docker/Dockerfile-mage-node --build-arg NPM_TOKEN=$NPM_TOKEN -t "mage_node" . && break
DOCKER_BUILDKIT=1 docker build -f testv2/tools/docker/Dockerfile-mage-node --build-arg NPM_TOKEN=$NPM_TOKEN -t "mage_node" . && break
count=$((count+1))
echo "Retrying e2e tests ($count/$retries)..."
echo "Retrying build mage_node image ($count/$retries)..."
sleep 30
done
if [ $count -ge $retries ]; then
echo "mage_node image building failed after $retries attempts."
exit 1
fi
env:
NPM_TOKEN: ${{ secrets.GITLAB_TOKEN }}

Expand All @@ -77,9 +82,13 @@ jobs:
do
bash dev/testv2/tools/scripts/run-unit.sh && break
count=$((count+1))
echo "Retrying e2e tests ($count/$retries)..."
echo "Retrying unit tests ($count/$retries)..."
sleep 30
done
if [ $count -ge $retries ]; then
echo "unit tests failed after $retries attempts."
exit 1
fi
env:
VERSION: ${{ matrix.magento-versions }}
NPM_TOKEN: ${{ secrets.GITLAB_TOKEN }}
Expand Down Expand Up @@ -133,15 +142,20 @@ jobs:
- name: Build mage_node image
shell: bash
run: |
cd magento2-extension/dev
retries=3
count=0
until [ $count -ge $retries ]
do
cd magento2-extension/dev && DOCKER_BUILDKIT=1 docker build -f testv2/tools/docker/Dockerfile-mage-node --build-arg NPM_TOKEN=$NPM_TOKEN -t "mage_node" . && break
DOCKER_BUILDKIT=1 docker build -f testv2/tools/docker/Dockerfile-mage-node --build-arg NPM_TOKEN=$NPM_TOKEN -t "mage_node" . && break
count=$((count+1))
echo "Retrying e2e tests ($count/$retries)..."
echo "Retrying build mage_node image ($count/$retries)..."
sleep 30
done
if [ $count -ge $retries ]; then
echo "mage_node image building failed after $retries attempts."
exit 1
fi
env:
NPM_TOKEN: ${{ secrets.GITLAB_TOKEN }}

Expand All @@ -158,6 +172,10 @@ jobs:
echo "Retrying e2e tests ($count/$retries)..."
sleep 30
done
if [ $count -ge $retries ]; then
echo "e2e tests failed after $retries attempts."
exit 1
fi
env:
VERSION: ${{ matrix.magento-versions }}
NPM_TOKEN: ${{ secrets.GITLAB_TOKEN }}

0 comments on commit b855637

Please sign in to comment.