mirror of
https://github.com/ckaczor/azuredatastudio.git
synced 2026-01-14 01:25:37 -05:00
Bumps [actions/setup-node](https://github.com/actions/setup-node) from 2 to 3. - [Release notes](https://github.com/actions/setup-node/releases) - [Commits](https://github.com/actions/setup-node/compare/v2...v3) --- updated-dependencies: - dependency-name: actions/setup-node dependency-type: direct:production update-type: version-update:semver-major ... Signed-off-by: dependabot[bot] <support@github.com> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
302 lines
12 KiB
YAML
302 lines
12 KiB
YAML
name: CI
|
|
|
|
on: workflow_dispatch
|
|
|
|
# on:
|
|
# push:
|
|
# branches:
|
|
# - main
|
|
# - release/*
|
|
# pull_request:
|
|
# branches:
|
|
# - main
|
|
# - release/*
|
|
|
|
jobs:
|
|
windows:
|
|
name: Windows
|
|
runs-on: windows-2022
|
|
timeout-minutes: 60
|
|
env:
|
|
CHILD_CONCURRENCY: "1"
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- uses: actions/setup-python@v4
|
|
with:
|
|
python-version: "2.x"
|
|
|
|
# {{SQL CARBON EDIT}} Skip caching for now
|
|
# - 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 archive
|
|
# id: cacheNodeModules
|
|
# uses: actions/cache@v3
|
|
# with:
|
|
# path: ".build/node_modules_cache"
|
|
# key: "${{ runner.os }}-cacheNodeModulesArchive-${{ steps.nodeModulesCacheKey.outputs.value }}"
|
|
# - name: Extract node_modules archive
|
|
# if: ${{ steps.cacheNodeModules.outputs.cache-hit == 'true' }}
|
|
# run: 7z.exe x .build/node_modules_cache/cache.7z -aos
|
|
# - 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@v3
|
|
# 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' }} {{SQL CARBON EDIT}} Skipping caching for now
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
|
run: yarn --frozen-lockfile --network-timeout 180000
|
|
# - name: Create node_modules archive {{SQL CARBON EDIT}} Skip caching for now
|
|
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
|
# run: |
|
|
# mkdir -Force .build
|
|
# node build/azure-pipelines/common/listNodeModules.js .build/node_modules_list.txt
|
|
# mkdir -Force .build/node_modules_cache
|
|
# 7z.exe a .build/node_modules_cache/cache.7z -mx3 `@.build/node_modules_list.txt
|
|
|
|
- name: Compile and Download
|
|
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" # {{SQL CARBON EDIT}} Remove unused options playwright-install download-builtin-extensions
|
|
|
|
- name: Run Core Unit Tests # {{SQL CARBON EDIT}} Rename to core for clarity
|
|
run: .\scripts\test.bat
|
|
|
|
# - name: Run Unit Tests (Browser) {{SQL CARBON EDIT}} disable for now
|
|
# run: yarn test-browser --browser chromium
|
|
|
|
# {{SQL CARBON EDIT}} Rename to core for clarity
|
|
# - name: Run Core Integration Tests {{SQL CARBON EDIT}} disable for now
|
|
# run: .\scripts\test-integration.bat
|
|
|
|
linux:
|
|
name: Linux
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 30
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
# TODO: rename azure-pipelines/linux/xvfb.init to github-actions
|
|
- 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 # {{SQL CARBON EDIT}} add kerberos dep
|
|
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@v3
|
|
with:
|
|
node-version: 16
|
|
# {{SQL CARBON EDIT}} Skip caching for now
|
|
# - 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@v3
|
|
# with:
|
|
# path: "**/node_modules"
|
|
# key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
|
|
# restore-keys: ${{ runner.os }}-cacheNodeModules14-
|
|
# - 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@v3
|
|
# 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' }} {{SQL CARBON EDIT}} Skip caching for now
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
|
run: yarn --frozen-lockfile --network-timeout 180000
|
|
|
|
# Don't inline source maps so that we generate code coverage for ts files
|
|
- name: Compile and Download
|
|
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" # {{SQL CARBON EDIT}} Remove unused options playwright-install download-builtin-extensions
|
|
env:
|
|
SQL_NO_INLINE_SOURCEMAP: 1
|
|
|
|
- name: Run Core Unit Tests # {{SQL CARBON EDIT}} Rename to core for clarity
|
|
id: electron-unit-tests
|
|
run: DISPLAY=:10 ./scripts/test.sh --runGlob "**/sql/**/*.test.js" --coverage
|
|
|
|
- name: Run Extension Unit Tests # {{SQL CARBON EDIT}} Rename to extension for clarity
|
|
id: electron-extension-unit-tests
|
|
run: DISPLAY=:10 ./scripts/test-extensions-unit.sh
|
|
|
|
# {{SQL CARBON EDIT}} Add coveralls. We merge first to get around issue where parallel builds weren't being combined correctly
|
|
- name: Combine code coverage files
|
|
run: node test/combineCoverage
|
|
- name: Upload Code Coverage
|
|
uses: coverallsapp/github-action@v2.2.0
|
|
with:
|
|
github-token: ${{ secrets.GITHUB_TOKEN }}
|
|
path-to-lcov: "test/coverage/lcov.info"
|
|
|
|
# - name: Run Unit Tests (Browser) {{SQL CARBON EDIT}} Skip for now
|
|
# id: browser-unit-tests
|
|
# run: DISPLAY=:10 yarn test-browser --browser chromium
|
|
|
|
# {{SQL CARBON EDIT}} Rename to core for clarity
|
|
# - name: Run Core Integration Tests {{SQL CARBON EDIT}} Skip for now
|
|
# id: electron-integration-tests
|
|
# run: DISPLAY=:10 ./scripts/test-integration.sh
|
|
|
|
darwin:
|
|
name: macOS
|
|
runs-on: macos-latest
|
|
timeout-minutes: 30
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
# {{SQL CARBON EDIT}} Skip caching for now
|
|
# - 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@v3
|
|
# with:
|
|
# path: "**/node_modules"
|
|
# key: ${{ runner.os }}-cacheNodeModules14-${{ steps.nodeModulesCacheKey.outputs.value }}
|
|
# restore-keys: ${{ runner.os }}-cacheNodeModules14-
|
|
# - 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@v3
|
|
# 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' }} {{SQL CARBON EDIT}} Skip caching for now
|
|
env:
|
|
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
|
|
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
|
|
run: yarn --frozen-lockfile --network-timeout 180000
|
|
|
|
- name: Compile and Download
|
|
run: yarn npm-run-all --max_old_space_size=4095 -lp compile "electron x64" # {{SQL CARBON EDIT}} Remove unused options playwright-install download-builtin-extensions
|
|
|
|
# This is required for keytar unittests, otherwise we hit
|
|
# https://github.com/atom/node-keytar/issues/76
|
|
- name: Create temporary keychain
|
|
run: |
|
|
security create-keychain -p pwd $RUNNER_TEMP/buildagent.keychain
|
|
security default-keychain -s $RUNNER_TEMP/buildagent.keychain
|
|
security unlock-keychain -p pwd $RUNNER_TEMP/buildagent.keychain
|
|
|
|
- name: Run Core Unit Tests # {{SQL CARBON EDIT}} Rename to core for clarity
|
|
run: DISPLAY=:10 ./scripts/test.sh
|
|
|
|
# - name: Run Unit Tests (Browser) {{SQL CARBON EDIT}} Skip for now
|
|
# run: DISPLAY=:10 yarn test-browser --browser chromium
|
|
|
|
# {{SQL CARBON EDIT}} Rename to core for clarity
|
|
# - name: Run Core Integration Tests {{SQL CARBON EDIT}} Skip for now
|
|
# run: DISPLAY=:10 ./scripts/test-integration.sh
|
|
|
|
hygiene:
|
|
name: Hygiene and Layering
|
|
runs-on: ubuntu-latest
|
|
timeout-minutes: 40
|
|
env:
|
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
|
steps:
|
|
- uses: actions/checkout@v3
|
|
|
|
- uses: actions/setup-node@v3
|
|
with:
|
|
node-version: 16
|
|
|
|
- name: Compute node modules cache key
|
|
id: nodeModulesCacheKey
|
|
run: echo "::set-output name=value::$(node build/azure-pipelines/common/sql-computeNodeModulesCacheKey.js)"
|
|
- name: Cache node modules
|
|
id: cacheNodeModules
|
|
uses: actions/cache@v3
|
|
with:
|
|
path: "**/node_modules"
|
|
key: ${{ runner.os }}-cacheNodeModules23-${{ steps.nodeModulesCacheKey.outputs.value }}
|
|
restore-keys: ${{ runner.os }}-cacheNodeModules23-
|
|
- 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@v3
|
|
with:
|
|
path: ${{ steps.yarnCacheDirPath.outputs.dir }}
|
|
key: ${{ runner.os }}-yarnCacheDir-${{ steps.nodeModulesCacheKey.outputs.value }}
|
|
restore-keys: ${{ runner.os }}-yarnCacheDir-
|
|
- name: Setup Build Environment # {{SQL CARBON EDIT}} Add step to install required packages if we need to run yarn
|
|
if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libkrb5-dev
|
|
- 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: Download Playwright
|
|
run: yarn playwright-install
|
|
|
|
- name: Run Hygiene Checks
|
|
run: yarn gulp hygiene
|
|
|
|
- name: Run Valid Layers Checks
|
|
run: yarn valid-layers-check
|
|
|
|
- name: Compile /build/
|
|
run: yarn --cwd build compile
|
|
|
|
- name: Check clean git state
|
|
run: ./.github/workflows/check-clean-git-state.sh
|
|
|
|
- name: Run eslint
|
|
run: yarn eslint
|
|
|
|
# {{SQL CARBON EDIT}} Don't need this
|
|
# - name: Run vscode-dts Compile Checks
|
|
# run: yarn vscode-dts-compile-check
|
|
|
|
- name: Run Trusted Types Checks
|
|
run: yarn tsec-compile-check
|