diff --git a/.github/workflows/smoke-test-pr-check.yaml b/.github/workflows/smoke-test-pr-check.yaml index 3d066e9b18a..fd8803209ab 100644 --- a/.github/workflows/smoke-test-pr-check.yaml +++ b/.github/workflows/smoke-test-pr-check.yaml @@ -28,15 +28,7 @@ jobs: steps: - name: Checkout che-code source code - uses: actions/checkout@v2 - - - name: Configuring nodejs 14.x version - uses: actions/setup-node@v3 - with: - node-version: '16' - - - name: Install yq - run: sudo pip install yq + uses: actions/checkout@v3 - name: Prepare Che-Code Dockerfile ( remove tests ) run: | @@ -44,8 +36,8 @@ jobs: # truncate Dockerfile, remove section that runs tests # cp -f build/dockerfiles/linux-libc.Dockerfile build/dockerfiles/linux-libc.no-test.Dockerfile - REMOVE_FROM="### Testing" - REMOVE_TO="# Store the content of the result" + REMOVE_FROM="### Beginning of tests" + REMOVE_TO="### Ending of tests" sed -i "/${REMOVE_FROM}/,/${REMOVE_TO}/{/${REMOVE_FROM}/n;/${REMOVE_TO}/!d;}" build/dockerfiles/linux-libc.no-test.Dockerfile # @@ -59,7 +51,7 @@ jobs: # build linux-libc-amd64:latest docker image # docker image prune -a -f - docker build -f build/dockerfiles/linux-libc.no-test.Dockerfile -t linux-libc-amd64 . + docker build --memory-swap -1 --memory 12g -f build/dockerfiles/linux-libc.no-test.Dockerfile -t linux-libc-amd64 . - name: Build Che-Code Docker image run: | @@ -71,11 +63,25 @@ jobs: sed -i -r -e "s|${REPLACE_FROM}||" build/dockerfiles/assembly.copy.Dockerfile REPLACE_FROM="COPY --from=linux-musl-content --chown=0:0 /checode-linux-musl /mnt/rootfs/checode-linux-musl" sed -i -r -e "s|${REPLACE_FROM}||" build/dockerfiles/assembly.copy.Dockerfile + export DOCKER_BUILDKIT=1 docker build -f build/dockerfiles/assembly.copy.Dockerfile -t che-code . + docker tag che-code:latest che-code:next docker save -o /tmp/che-code-latest.tar che-code:latest che-code:next + - name: Display docker images + run: | + docker images + + - name: Cleanup docker images + run: | + docker system prune -af + + - name: Disk free + run: | + df -h + - name: Start minikube id: run-minikube uses: che-incubator/setup-minikube-action@next diff --git a/build/dockerfiles/linux-libc.Dockerfile b/build/dockerfiles/linux-libc.Dockerfile index db6114a5a6b..c3251896d27 100644 --- a/build/dockerfiles/linux-libc.Dockerfile +++ b/build/dockerfiles/linux-libc.Dockerfile @@ -81,7 +81,9 @@ RUN NODE_ARCH=$(echo "console.log(process.arch)" | node) \ RUN chmod a+x /checode/out/server-main.js \ && chgrp -R 0 /checode && chmod -R g+rwX /checode -### Testing +### Beginning of tests +# Do not change line above! It is used to cut this section to skip tests + # Compile tests RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \ compile-extension:markdown-language-features \ @@ -126,6 +128,9 @@ RUN [[ $(uname -m) == "x86_64" ]] && NODE_ARCH=$(echo "console.log(process.arch) VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \ /opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m yarn smoketest-no-compile --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader" +# Do not change line below! It is used to cut this section to skip tests +### Ending of tests + ######################################################### # # Copy VS Code launcher to the container