-
Notifications
You must be signed in to change notification settings - Fork 70
143 lines (127 loc) · 4.86 KB
/
insiders.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
name: Insiders
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
# timeout-minutes: 30
steps:
- uses: actions/checkout@v2
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
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@v2
with:
node-version: 14
- 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 "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache node modules
id: cacheNodeModules
uses: actions/cache@v2
with:
path: "**/node_modules"
key: ${{ runner.os }}-cacheNodeModules21-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules21-
- name: Get yarn cache directory path
id: yarnCacheDirPath
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
run: echo "::set-output name=dir::$(yarn cache dir)"
- name: Cache yarn directory
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
uses: actions/cache@v2
with:
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-yarnCacheDir-
- name: Execute yarn
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
run: yarn --frozen-lockfile --network-timeout 180000
- name: Compile
run: |
yarn npm-run-all --max_old_space_size=4095 -lp compile playwright-install download-builtin-extensions
- name: Compile test suites
run: |
set -e
yarn --cwd test/smoke compile
yarn --cwd test/integration/browser compile
- name: Run integration tests
id: runIntegrationTests
run: |
./scripts/test-web-integration.sh --browser chromium
- name: Run smoke tests
id: runSmokeTests
run: |
yarn smoketest-no-compile --web --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@v2
with:
name: upstream_commit
path: __upstream_commit.txt
# Store HEAD commit to make a insiders release (release.yml)
- name: Write the release commit to a file
if: ${{ success() }}
run: |
echo "$(git rev-parse HEAD)" > __release_commit.txt
- name: Upload release commit file
if: ${{ success() }}
uses: actions/upload-artifact@v2
with:
name: release_commit
path: __release_commit.txt
- name: Upload logs files
if: ${{ failure() && (steps.runSmokeTests.outcome == 'failure' || steps.runIntegrationTests.outcome == 'failure') }}
uses: actions/upload-artifact@v2
with:
name: logs-linux-x64
path: .build/logs
- name: Slack Notification
if: always()
uses: rtCamp/action-slack-notify@v2
env:
SLACK_WEBHOOK: ${{ secrets.SLACK_WEBHOOK }}
SLACK_COLOR: ${{ job.status }}