diff --git a/.github/workflows/unit-test-engine.yml b/.github/workflows/unit-test-engine.yml index 6a758162f2e..3b3cbffa78a 100644 --- a/.github/workflows/unit-test-engine.yml +++ b/.github/workflows/unit-test-engine.yml @@ -26,6 +26,7 @@ env: DOCKER_FILE_NAME: "devel" CONTAINER_NAME: "utTest" EXTRA_CONTAINER_NAME: "modelTest" + CONTAINER_SCAN: "codeScan" jobs: unit-test: @@ -115,6 +116,14 @@ jobs: runs-on: itrex-node-spell needs: [unit-test] steps: + - name: Docker Clean Up + run: | + docker ps -a + if [[ $(docker ps -a | grep -i '${{ env.CONTAINER_SCAN }}-${{ runner.name }}'$) ]]; then + docker start ${{ env.CONTAINER_SCAN }}-${{ runner.name }} + echo "remove left files through container ..." + docker exec ${{ env.CONTAINER_SCAN }}-${{ runner.name }} bash -c "ls -a /intel-extension-for-transformers && rm -fr /intel-extension-for-transformers/* && rm -fr /intel-extension-for-transformers/.* || true" + fi - name: Checkout out Repo uses: actions/checkout@v3 diff --git a/.github/workflows/unit-test-neuralchat.yml b/.github/workflows/unit-test-neuralchat.yml index 91f6875a455..f606121bccc 100644 --- a/.github/workflows/unit-test-neuralchat.yml +++ b/.github/workflows/unit-test-neuralchat.yml @@ -33,6 +33,7 @@ env: DOCKER_FILE_NAME: "devel" CONTAINER_NAME: "utTest" EXTRA_CONTAINER_NAME: "modelTest" + CONTAINER_SCAN: "codeScan" jobs: unit-test: @@ -120,6 +121,14 @@ jobs: runs-on: itrex-node-spell needs: [unit-test] steps: + - name: Docker Clean Up + run: | + docker ps -a + if [[ $(docker ps -a | grep -i '${{ env.CONTAINER_SCAN }}-${{ runner.name }}'$) ]]; then + docker start ${{ env.CONTAINER_SCAN }}-${{ runner.name }} + echo "remove left files through container ..." + docker exec ${{ env.CONTAINER_SCAN }}-${{ runner.name }} bash -c "ls -a /intel-extension-for-transformers && rm -fr /intel-extension-for-transformers/* && rm -fr /intel-extension-for-transformers/.* || true" + fi - name: Checkout out Repo uses: actions/checkout@v3 diff --git a/.github/workflows/unit-test-optimize.yml b/.github/workflows/unit-test-optimize.yml index e702ec68e07..267b3531a7a 100644 --- a/.github/workflows/unit-test-optimize.yml +++ b/.github/workflows/unit-test-optimize.yml @@ -30,6 +30,7 @@ env: DOCKER_FILE_NAME: "devel" CONTAINER_NAME: "utTest" EXTRA_CONTAINER_NAME: "modelTest" + CONTAINER_SCAN: "codeScan" jobs: unit-test: @@ -116,6 +117,14 @@ jobs: runs-on: itrex-node-spell needs: [unit-test] steps: + - name: Docker Clean Up + run: | + docker ps -a + if [[ $(docker ps -a | grep -i '${{ env.CONTAINER_SCAN }}-${{ runner.name }}'$) ]]; then + docker start ${{ env.CONTAINER_SCAN }}-${{ runner.name }} + echo "remove left files through container ..." + docker exec ${{ env.CONTAINER_SCAN }}-${{ runner.name }} bash -c "ls -a /intel-extension-for-transformers && rm -fr /intel-extension-for-transformers/* && rm -fr /intel-extension-for-transformers/.* || true" + fi - name: Checkout out Repo uses: actions/checkout@v3