Skip to content

Commit 2149780

Browse files
[fork] Simplify Testing
1 parent f18c505 commit 2149780

7 files changed

Lines changed: 8 additions & 209 deletions

File tree

.github/workflows/pull-request-check-publish.yml

Lines changed: 4 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -59,37 +59,21 @@ jobs:
5959
- name: Load Docker images
6060
run: |
6161
docker load -i che-code-amd64.tgz
62-
docker load -i che-code-arm64.tgz
63-
docker load -i che-dev.tgz
6462
6563
- name: Login to Quay.io
6664
uses: docker/login-action@v3
6765
with:
6866
registry: quay.io
69-
username: ${{ secrets.QUAY_PULL_REQUESTS_USERNAME }}
70-
password: ${{ secrets.QUAY_PULL_REQUESTS_PASSWORD }}
67+
username: ${{ secrets.QUAY_USERNAME }}
68+
password: ${{ secrets.QUAY_PASSWORD }}
7169

7270
- name: Push che-code-amd64 docker image
7371
run: |
74-
export IMAGE=quay.io/che-incubator-pull-requests/che-code:pr-${{env._PR_NUMBER}}-amd64
72+
export IMAGE=quay.io/${{ secrets.QUAY_USERNAME }}/che-code:pr-${{env._PR_NUMBER}}-amd64
7573
docker tag che-code-amd64 ${IMAGE}
7674
docker push ${IMAGE}
7775
echo "_CHE_CODE_AMD64_IMAGE=${IMAGE}" >> $GITHUB_ENV
7876
79-
- name: Push che-code-arm64 docker image
80-
run: |
81-
export IMAGE=quay.io/che-incubator-pull-requests/che-code:pr-${{env._PR_NUMBER}}-arm64
82-
docker tag che-code-arm64 ${IMAGE}
83-
docker push ${IMAGE}
84-
echo "_CHE_CODE_ARM64_IMAGE=${IMAGE}" >> $GITHUB_ENV
85-
86-
- name: Push che-dev docker image
87-
run: |
88-
export IMAGE=quay.io/che-incubator-pull-requests/che-code-dev:pr-${{env._PR_NUMBER}}-dev-amd64
89-
docker tag che-dev ${IMAGE}
90-
docker push ${IMAGE}
91-
echo "_CHE_DEV_IMAGE=${IMAGE}" >> $GITHUB_ENV
92-
9377
- name: 'Comment PR'
9478
uses: actions/github-script@v7
9579
with:
@@ -99,5 +83,5 @@ jobs:
9983
issue_number: process.env._PR_NUMBER,
10084
owner: context.repo.owner,
10185
repo: context.repo.repo,
102-
body: `Pull Request images published ✨\n\nEditor amd64: [${process.env._CHE_CODE_AMD64_IMAGE}](https://${process.env._CHE_CODE_AMD64_IMAGE})\nEditor arm64: [${process.env._CHE_CODE_ARM64_IMAGE}](https://${process.env._CHE_CODE_ARM64_IMAGE})\nDev image: [${process.env._CHE_DEV_IMAGE}](https://${process.env._CHE_DEV_IMAGE})`
86+
body: `Pull Request images published ✨\n\nEditor amd64: [${process.env._CHE_CODE_AMD64_IMAGE}](https://${process.env._CHE_CODE_AMD64_IMAGE})`
10387
})

.github/workflows/pull-request-check.yml

Lines changed: 2 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ jobs:
4242
fail-fast: false
4343
matrix:
4444
dist: ['libc-ubi8', 'libc-ubi9', 'musl']
45-
runners: ['ubuntu-22.04', 'ubuntu-22.04-arm']
45+
runners: ['ubuntu-22.04']
4646
runs-on: ${{matrix.runners}}
4747
steps:
4848
- name: Set arch environment variable
@@ -79,7 +79,7 @@ jobs:
7979
strategy:
8080
fail-fast: false
8181
matrix:
82-
runners: ['ubuntu-22.04', 'ubuntu-22.04-arm']
82+
runners: ['ubuntu-22.04']
8383
runs-on: ${{matrix.runners}}
8484
steps:
8585
- name: Set arch environment variable
@@ -138,36 +138,3 @@ jobs:
138138
with:
139139
name: pull-request-number
140140
path: PR_NUMBER
141-
142-
dev:
143-
name: build-che-dev-image
144-
runs-on: ubuntu-22.04
145-
steps:
146-
- name: Checkout che-code source code
147-
uses: actions/checkout@v4
148-
149-
- name: Cleanup docker images
150-
run: |
151-
docker system prune -af
152-
153-
- name: Build Che-Code Docker image
154-
run: |
155-
docker buildx build \
156-
--platform linux/amd64 \
157-
--progress=plain \
158-
-f build/dockerfiles/dev.Dockerfile \
159-
-t che-dev .
160-
161-
- name: Display docker images
162-
run: |
163-
docker images
164-
165-
- name: Compress che-dev image to a file
166-
run: |
167-
docker save che-dev | gzip > che-dev.tgz
168-
169-
- name: Upload che-dev docker image artifact
170-
uses: actions/upload-artifact@v4
171-
with:
172-
name: che-dev
173-
path: che-dev.tgz

build/dockerfiles/linux-libc-ubi8.Dockerfile

Lines changed: 0 additions & 52 deletions
Original file line numberDiff line numberDiff line change
@@ -86,58 +86,6 @@ RUN chmod a+x /checode/out/server-main.js \
8686
### Beginning of tests
8787
# Do not change line above! It is used to cut this section to skip tests
8888

89-
# Compile tests
90-
RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
91-
compile-extension:markdown-language-features \
92-
compile-extension:typescript-language-features \
93-
compile-extension:emmet \
94-
compile-extension:git \
95-
compile-extension:ipynb \
96-
compile-extension-media \
97-
compile-extension:configuration-editing
98-
99-
# Compile test suites
100-
# https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
101-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
102-
103-
# install test dependencies
104-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
105-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
106-
# Install procps to manage to kill processes and centos stream repository
107-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
108-
ARCH=$(uname -m) && \
109-
yum install --nobest -y procps \
110-
https://vault.centos.org/centos/8/extras/${ARCH}/os/Packages/epel-release-8-11.el8.noarch.rpm \
111-
https://vault.centos.org/8-stream/BaseOS/${ARCH}/os/Packages/centos-gpg-keys-8-3.el8.noarch.rpm \
112-
https://vault.centos.org/8-stream/BaseOS/${ARCH}/os/Packages/centos-stream-repos-8-3.el8.noarch.rpm; \
113-
fi
114-
115-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
116-
sed -i 's|#baseurl=http://mirror.centos.org|baseurl=http://vault.centos.org|g' /etc/yum.repos.d/CentOS-* \
117-
&& yum install -y chromium \
118-
&& PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) \
119-
&& rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" \
120-
&& ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
121-
fi
122-
123-
# use of retry and timeout
124-
COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
125-
RUN chmod u+x /opt/app-root/src/retry.sh
126-
127-
# Run integration tests (Browser)
128-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
129-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
130-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
131-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
132-
fi
133-
134-
# Run smoke tests (Browser)
135-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
136-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
137-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
138-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
139-
fi
140-
14189
# Do not change line below! It is used to cut this section to skip tests
14290
### Ending of tests
14391

build/dockerfiles/linux-libc-ubi9.Dockerfile

Lines changed: 0 additions & 51 deletions
Original file line numberDiff line numberDiff line change
@@ -88,57 +88,6 @@ RUN chmod a+x /checode/out/server-main.js \
8888
### Beginning of tests
8989
# Do not change line above! It is used to cut this section to skip tests
9090

91-
# Compile tests
92-
RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
93-
compile-extension:markdown-language-features \
94-
compile-extension:typescript-language-features \
95-
compile-extension:emmet \
96-
compile-extension:git \
97-
compile-extension:ipynb \
98-
compile-extension-media \
99-
compile-extension:configuration-editing
100-
101-
# # Compile test suites
102-
# https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
103-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
104-
105-
# install test dependencies
106-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
107-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
108-
# Install procps to manage to kill processes and centos stream repository
109-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
110-
ARCH=$(uname -m) && \
111-
yum install --nobest -y procps \
112-
https://rpmfind.net/linux/epel/9/Everything/x86_64/Packages/e/epel-release-9-10.el9.noarch.rpm \
113-
https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-9.0-23.el9.noarch.rpm \
114-
https://rpmfind.net/linux/centos-stream/9-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-9.0-23.el9.noarch.rpm; \
115-
fi
116-
117-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
118-
yum install -y chromium && \
119-
PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) && \
120-
rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" && \
121-
ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
122-
fi
123-
124-
# use of retry and timeout
125-
COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
126-
RUN chmod u+x /opt/app-root/src/retry.sh
127-
128-
# Run integration tests (Browser)
129-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
130-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
131-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
132-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
133-
fi
134-
135-
# Run smoke tests (Browser)
136-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
137-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
138-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
139-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
140-
fi
141-
14291
# Do not change line below! It is used to cut this section to skip tests
14392
### Ending of tests
14493

build/dockerfiles/linux-musl.Dockerfile

Lines changed: 0 additions & 49 deletions
Original file line numberDiff line numberDiff line change
@@ -64,55 +64,6 @@ RUN cp -r ../vscode-reh-web-linux-alpine /checode
6464
RUN chmod a+x /checode/out/server-main.js \
6565
&& chgrp -R 0 /checode && chmod -R g+rwX /checode
6666

67-
# Compile tests
68-
RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
69-
compile-extension:markdown-language-features \
70-
compile-extension:typescript-language-features \
71-
compile-extension:emmet \
72-
compile-extension:git \
73-
compile-extension:ipynb \
74-
compile-extension-media \
75-
compile-extension:configuration-editing
76-
77-
# Compile test suites
78-
# https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
79-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
80-
npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; \
81-
fi
82-
# use of retry and timeout
83-
COPY /build/scripts/helper/retry.sh /usr/bin/retry
84-
RUN chmod u+x /usr/bin/retry
85-
86-
# install test dependencies
87-
# chromium for tests and procps as tests are using kill commands and it does not work with busybox implementation
88-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
89-
apk add --update --no-cache chromium procps; \
90-
fi
91-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
92-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
93-
npm run playwright-install; \
94-
fi
95-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
96-
PLAYWRIGHT_HEADLESS_PATH=$(echo /root/.cache/ms-playwright/chromium_headless_shell-*/chrome-linux) && \
97-
echo "Found headless_shell path: $PLAYWRIGHT_HEADLESS_PATH" && \
98-
rm -f "$PLAYWRIGHT_HEADLESS_PATH/headless_shell" && \
99-
ln -sf /usr/bin/chromium-browser "$PLAYWRIGHT_HEADLESS_PATH/headless_shell" && \
100-
ln -sf /usr/bin/chromium-browser "$PLAYWRIGHT_HEADLESS_PATH/chrome" && \
101-
ls -la "$PLAYWRIGHT_HEADLESS_PATH"; \
102-
fi
103-
104-
# Run integration tests (Browser)
105-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
106-
VSCODE_REMOTE_SERVER_PATH="/vscode-reh-web-linux-alpine" \
107-
retry -v -t 3 -s 2 -- timeout 5m ./scripts/test-web-integration.sh --browser chromium; \
108-
fi
109-
110-
# Run smoke tests (Browser)
111-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
112-
VSCODE_REMOTE_SERVER_PATH="/vscode-reh-web-linux-alpine" \
113-
retry -v -t 3 -s 2 -- timeout 5m npm run smoketest-no-compile -- --web --headless --electronArgs="--disable-dev-shm-usage --use-gl=swiftshader"; \
114-
fi
115-
11667
#########################################################
11768
#
11869
# Copy VS Code launcher to the container

code/build/gulpfile.compile.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,6 @@ gulp.task(compileBuildWithoutManglingTask);
3030
exports.compileBuildWithoutManglingTask = compileBuildWithoutManglingTask;
3131

3232
// CI compile, including nls and inline sources in sourcemaps, mangling, minification, for build
33-
const compileBuildWithManglingTask = task.define('compile-build-with-mangling', makeCompileBuildTask(false));
33+
const compileBuildWithManglingTask = task.define('compile-build-with-mangling', makeCompileBuildTask(true));
3434
gulp.task(compileBuildWithManglingTask);
3535
exports.compileBuildWithManglingTask = compileBuildWithManglingTask;

launcher/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
"format:fix": "prettier --write '{src,tests}/**/*.ts' package.json",
2424
"lint": "eslint --cache=true --no-error-on-unmatched-pattern=true '{src,tests}/(!model|**)/*.ts'",
2525
"lint:fix": "eslint --fix --cache=true --no-error-on-unmatched-pattern=true \"{src,tests}/(!model|**)/*.{ts,tsx}\"",
26-
"test": "jest --forceExit",
26+
"test": "echo 'tests were skipped'",
2727
"watch": "tsc -w"
2828
},
2929
"repository": {

0 commit comments

Comments
 (0)