Skip to content

OpenVSCode Server Rebase #793

OpenVSCode Server Rebase

OpenVSCode Server Rebase #793

Workflow file for this run

name: OpenVSCode Server Rebase
on:
workflow_dispatch:
inputs:
parent_commit:
description: "Parent commit"
required: true
default: "upstream/main"
update_branch:
description: "The branch to update"
required: true
default: "main"
schedule:
- cron: "0 23 * * 1-5"
env:
# Default values will be used by cron job
PARENT_COMMIT: ${{ github.event.inputs.parent_commit || 'upstream/main' }}
UPDATE_BRANCH: ${{ github.event.inputs.update_branch || 'main' }}
jobs:
sync-main:
name: Syncing openvscode-server
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
repository: "gitpod-io/openvscode-server"
ref: ${{ env.UPDATE_BRANCH }}
fetch-depth: 0
token: ${{ secrets.VSCODE_GITHUB_TOKEN }}
- name: Configure git credentials
run: |
git config user.name Jean Pierre
git config user.email [email protected]
- name: Setup Build Environment
run: |
sudo apt-get update
sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1 libkrb5-dev
sudo cp build/azure-pipelines/linux/xvfb.init /etc/init.d/xvfb
sudo chmod +x /etc/init.d/xvfb
sudo update-rc.d xvfb defaults
sudo service xvfb start
- uses: actions/setup-node@v4
with:
node-version-file: .nvmrc
- name: Sync with upstream (rebase)
run: |
./scripts/sync-with-upstream.sh ${{ env.PARENT_COMMIT }} ${{ env.UPDATE_BRANCH }} "code web server initial commit" true
- name: Compute node modules cache key
id: nodeModulesCacheKey
run: echo "value=$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)" >> $GITHUB_OUTPUT
- name: Cache node modules
id: cacheNodeModules
uses: actions/cache@v4
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
- name: Get npm cache directory path
id: npmCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: echo "dir=$(npm config get cache)" >> $GITHUB_OUTPUT
- name: Cache npm directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
uses: actions/cache@v4
with:
path: ${{ steps.npmCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-npmCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-npmCacheDir-
- name: Execute npm
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
run: npm ci
- name: Compile
run: |
npm exec -- npm-run-all -lp compile playwright-install download-builtin-extensions
- name: Compile Integration Tests
run: npm run compile
working-directory: test/integration/browser
- name: Compile Smoke Tests
run: npm run compile
working-directory: test/smoke
- name: Run integration tests
id: runIntegrationTests
run: |
./scripts/test-web-integration.sh --browser chromium
- name: Build extensions for smoke tests
run: |
npm run gulp compile-extension:markdown-language-features compile-extension:ipynb compile-extension-media compile-extension:vscode-test-resolver
- name: Run smoke tests
id: runSmokeTests
run: |
yarn smoketest-no-compile --web --tracing --headless --electronArgs="--disable-dev-shm-usage"
- name: Push changes
run: |
git push origin ${{ env.UPDATE_BRANCH }} --force-with-lease
- name: Write upstream parent commit to file
if: ${{ success() }}
run: |
echo "$(git rev-parse ${{ env.PARENT_COMMIT }})" > __upstream_commit.txt
- name: Upload parent commit file
if: ${{ success() }}
uses: actions/upload-artifact@v4
with:
name: upstream_commit
path: __upstream_commit.txt
- name: Upload logs files
if: ${{ failure() && (steps.runSmokeTests.outcome == 'failure' || steps.runIntegrationTests.outcome == 'failure') }}
uses: actions/upload-artifact@v4
with:
name: logs-linux-x64
path: .build/logs
- name: Get previous job's status
id: lastrun
uses: filiptronicek/get-last-job-status@main
- name: Slack Notification
if: ${{ (success() && steps.lastrun.outputs.status == 'failed') || failure() }}
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}
SLACK_MESSAGE: |
Exec command:
```
./scripts/sync-with-upstream.sh ${{ env.PARENT_COMMIT }} ${{ env.UPDATE_BRANCH }} "code web server initial commit" true
```