diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 4c62b919..1c4cf237 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -11,25 +11,64 @@ on: jobs: build: name: Smoke Test - # This job runs on Linux runs-on: ubuntu-latest + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - - uses: actions/checkout@v1 + - uses: actions/checkout@v2 + - uses: microsoft/playwright-github-action@v1 - - name: Set up Node.js - uses: actions/setup-node@v1 + + - uses: actions/setup-node@v2 with: - node-version: 10.x + node-version: 12 + - name: Checkout VS Code run: git clone --depth 1 https://github.com/microsoft/vscode vscode - - name: VS Code yarn & Editor Distro + + - 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 yarn gulp editor-distro + - name: Typings validation prep run: | mkdir typings-test + - name: Typings validation working-directory: ./typings-test run: | @@ -38,13 +77,17 @@ jobs: yarn tsc --init echo "import '../vscode/out-monaco-editor-core';" > a.ts yarn tsc --noEmit + - 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 &