Skip to content

Commit 2a64abd

Browse files
[fork] Simplify Testing
1 parent cffaa7b commit 2a64abd

7 files changed

Lines changed: 16 additions & 190 deletions

File tree

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

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -71,13 +71,20 @@ jobs:
7171
run: |
7272
docker load -i che-code-amd64.tgz
7373
74+
- name: Login to Quay.io
75+
uses: docker/login-action@v3
76+
with:
77+
registry: quay.io
78+
username: ${{ secrets.QUAY_USERNAME }}
79+
password: ${{ secrets.QUAY_PASSWORD }}
80+
7481
- name: Push che-code-amd64 docker image
7582
run: |
76-
export IMAGE=quay.io/che-incubator-pull-requests/che-code:pr-${{env._PR_NUMBER}}-amd64
83+
export IMAGE=quay.io/${{ secrets.QUAY_USERNAME }}/che-code:pr-${{env._PR_NUMBER}}-amd64
7784
docker tag che-code-amd64 ${IMAGE}
7885
docker push ${IMAGE}
7986
echo "_CHE_CODE_AMD64_IMAGE=${IMAGE}" >> $GITHUB_ENV
80-
87+
8188
- name: Remove che-code-amd64 and prune
8289
run: |
8390
docker image rm che-code-amd64 || true
@@ -93,7 +100,7 @@ jobs:
93100
docker tag che-code-arm64 ${IMAGE}
94101
docker push ${IMAGE}
95102
echo "_CHE_CODE_ARM64_IMAGE=${IMAGE}" >> $GITHUB_ENV
96-
103+
97104
- name: Remove che-code-arm64 and prune
98105
run: |
99106
docker image rm che-code-arm64 || true
@@ -109,7 +116,7 @@ jobs:
109116
docker tag che-dev ${IMAGE}
110117
docker push ${IMAGE}
111118
echo "_CHE_DEV_IMAGE=${IMAGE}" >> $GITHUB_ENV
112-
119+
113120
- name: Remove che-dev and prune
114121
run: |
115122
docker image rm che-dev || true
@@ -124,5 +131,5 @@ jobs:
124131
issue_number: process.env._PR_NUMBER,
125132
owner: context.repo.owner,
126133
repo: context.repo.repo,
127-
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})`
134+
body: `Pull Request images published ✨\n\nEditor amd64: [${process.env._CHE_CODE_AMD64_IMAGE}](https://${process.env._CHE_CODE_AMD64_IMAGE})`
128135
})

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

Lines changed: 2 additions & 40 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,41 +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: Free up disk space
150-
run: |
151-
rm -rf /opt/hostedtoolcache
152-
df -h
153-
154-
- name: Cleanup docker images
155-
run: |
156-
docker system prune -af
157-
158-
- name: Build Che-Code Docker image
159-
run: |
160-
docker buildx build \
161-
--platform linux/amd64 \
162-
--progress=plain \
163-
-f build/dockerfiles/dev.Dockerfile \
164-
-t che-dev .
165-
166-
- name: Display docker images
167-
run: |
168-
docker images
169-
170-
- name: Compress che-dev image to a file
171-
run: |
172-
docker save che-dev | gzip > che-dev.tgz
173-
174-
- name: Upload che-dev docker image artifact
175-
uses: actions/upload-artifact@v4
176-
with:
177-
name: che-dev
178-
path: che-dev.tgz

build/dockerfiles/linux-libc-ubi8.Dockerfile

Lines changed: 0 additions & 53 deletions
Original file line numberDiff line numberDiff line change
@@ -92,59 +92,6 @@ RUN chmod a+x /checode/out/server-main.js \
9292
### Beginning of tests
9393
# Do not change line above! It is used to cut this section to skip tests
9494

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

build/dockerfiles/linux-libc-ubi9.Dockerfile

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

97-
# Compile tests
98-
RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
99-
compile-extension:markdown-language-features \
100-
compile-extension:typescript-language-features \
101-
compile-extension:emmet \
102-
compile-extension:git \
103-
compile-extension:ipynb \
104-
compile-extension-media \
105-
compile-extension:configuration-editing
106-
107-
# # Compile test suites
108-
# https://github.com/microsoft/vscode/blob/cdde5bedbf3ed88f93b5090bb3ed9ef2deb7a1b4/test/integration/browser/README.md#compile
109-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm --prefix test/smoke run compile && npm --prefix test/integration/browser run compile; fi
110-
111-
# install test dependencies
112-
ENV PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD=0
113-
RUN if [ "$(uname -m)" = "x86_64" ]; then npm run playwright-install; fi
114-
# Install procps to manage to kill processes and centos stream repository
115-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
116-
ARCH=$(uname -m) && \
117-
yum install --nobest -y procps \
118-
https://dl.fedoraproject.org/pub/epel/9/Everything/x86_64/Packages/e/epel-release-9-10.el9.noarch.rpm \
119-
https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-gpg-keys-9.0-32.el9.noarch.rpm \
120-
https://mirror.stream.centos.org/9-stream/BaseOS/x86_64/os/Packages/centos-stream-repos-9.0-32.el9.noarch.rpm; \
121-
fi
122-
123-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
124-
yum install -y chromium && \
125-
PLAYWRIGHT_CHROMIUM_PATH=$(echo /opt/app-root/src/.cache/ms-playwright/chromium-*/) && \
126-
rm "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome" && \
127-
ln -s /usr/bin/chromium-browser "${PLAYWRIGHT_CHROMIUM_PATH}/chrome-linux/chrome"; \
128-
fi
129-
130-
# use of retry and timeout
131-
COPY /build/scripts/helper/retry.sh /opt/app-root/src/retry.sh
132-
RUN chmod u+x /opt/app-root/src/retry.sh
133-
134-
# Run integration 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-
MACHINE_EXEC_MAX_RETRIES=1 \
139-
/opt/app-root/src/retry.sh -v -t 3 -s 2 -- timeout -v 5m ./scripts/test-web-integration.sh --browser chromium; \
140-
fi
141-
142-
# Run smoke tests (Browser)
143-
RUN if [ "$(uname -m)" = "x86_64" ]; then \
144-
NODE_ARCH=$(echo "console.log(process.arch)" | node) \
145-
VSCODE_REMOTE_SERVER_PATH="$(pwd)/../vscode-reh-web-linux-${NODE_ARCH}" \
146-
/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"; \
147-
fi
148-
14997
# Do not change line below! It is used to cut this section to skip tests
15098
### Ending of tests
15199

build/dockerfiles/linux-musl.Dockerfile

Lines changed: 0 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -78,44 +78,6 @@ RUN ./node_modules/.bin/gulp compile-extension:vscode-api-tests \
7878

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

code/build/gulpfile.compile.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -23,5 +23,5 @@ export const compileBuildWithoutManglingTask = task.define('compile-build-withou
2323
gulp.task(compileBuildWithoutManglingTask);
2424

2525
// CI compile, including nls and inline sources in sourcemaps, mangling, minification, for build
26-
export const compileBuildWithManglingTask = task.define('compile-build-with-mangling', task.series(compilation.copyCodiconsTask, makeCompileBuildTask(false)));
26+
export const compileBuildWithManglingTask = task.define('compile-build-with-mangling', task.series(compilation.copyCodiconsTask, makeCompileBuildTask(true)));
2727
gulp.task(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)