monaco-editor/.github/workflows/ci.yml
2020-12-28 18:03:19 +01:00

84 lines
2.4 KiB
YAML

name: Build
on:
push:
branches: [ master ]
pull_request:
branches: [ master ]
schedule:
- cron: '0 8 * * *'
jobs:
build:
name: Smoke Test
runs-on: ubuntu-latest
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2
- uses: microsoft/playwright-github-action@v1
- uses: actions/setup-node@v2
with:
node-version: 12
- name: Checkout VS Code
run: git clone --depth 1 https://github.com/microsoft/vscode vscode
- name: Compute VS Code node modules cache key
id: nodeModulesCacheKey
working-directory: ./vscode
run: echo "::set-output name=value::$(node build/azure-pipelines/common/computeNodeModulesCacheKey.js)"
- name: Cache VS Code node modules
id: cacheNodeModules
uses: actions/cache@v2
with:
path: "vscode/**/node_modules"
key: ${{ runner.os }}-cacheNodeModules-${{ steps.nodeModulesCacheKey.outputs.value }}
restore-keys: ${{ runner.os }}-cacheNodeModules-
- 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
working-directory: ./vscode
run: yarn --frozen-lockfile --network-timeout 180000
- name: Editor Distro
working-directory: ./vscode
run: |
yarn gulp editor-distro
- name: NPM Install
run: npm install
- name: Webpack Bundle
run: |
npm run bundle
- name: Build Tests
run: npm run build-test
- name: Run Smoke Test
run: |
npm run ciserver &
sleep 10
BROWSER=chromium npm run test
BROWSER=firefox npm run test
BROWSER=webkit npm run test