Add back eslint and tsec to basic checks (#23637)

* Add back eslint and tsec to basic checks

* ext

* enable tsec

* Add comments

* Add check-clean-git-state

* Make executable

* update build & distro

* Update size

* distro
This commit is contained in:
Charles Gagnon
2023-07-05 17:15:27 -07:00
committed by GitHub
parent 76232ffb25
commit 0dda36cd6e
18 changed files with 150 additions and 118 deletions

View File

@@ -70,108 +70,111 @@ jobs:
id: electron-integration-tests
run: DISPLAY=:10 ./scripts/test-integration.sh
# {{SQL CARBON TODO}} Bring back "Hygiene and Layering" and "Warm up node modules cache"
# hygiene:
# if: github.ref != 'refs/heads/main'
# name: Hygiene and Layering
# runs-on: ubuntu-latest
# timeout-minutes: 40
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v3
hygiene:
if: github.ref != 'refs/heads/main'
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
- 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/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: 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
# {{SQL CARBON TODO}} Update node modules caching to work with our cache keys
# - 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@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
# - name: Get yarn cache directory path
# id: yarnCacheDirPath
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
# - 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 TODO}} Update node modules caching to work with our cache keys
env:
PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
ELECTRON_SKIP_BINARY_DOWNLOAD: 1
run: yarn --frozen-lockfile --network-timeout 180000
# - name: Run Hygiene Checks
# run: yarn gulp hygiene
- name: Run Hygiene Checks
run: yarn gulp hygiene
# - name: Run Valid Layers Checks
# run: yarn valid-layers-check
- name: Run Valid Layers Checks
run: yarn valid-layers-check
# - name: Compile /build/
# run: yarn --cwd build compile
- name: Compile /build/
run: yarn --cwd build compile
# - name: Check clean git state
# run: ./.github/workflows/check-clean-git-state.sh
- name: Check clean git state
run: ./.github/workflows/check-clean-git-state.sh
# - name: Run eslint
# run: yarn eslint
- name: Run eslint
run: yarn eslint
# - name: Run vscode-dts Compile Checks
# run: yarn vscode-dts-compile-check
# {{SQL CARBON EDIT}} Add linting for our folders
- name: Run sqllint
run: yarn sqllint
# - name: Run Trusted Types Checks
# run: yarn tsec-compile-check
- name: Run vscode-dts Compile Checks
run: yarn vscode-dts-compile-check
# warm-cache:
# name: Warm up node modules cache
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# timeout-minutes: 40
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v3
- name: Run Trusted Types Checks
run: yarn tsec-compile-check
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# {{SQL CARBON TODO}} Update node modules caching to work with our cache keys
# warm-cache:
# name: Warm up node modules cache
# if: github.ref == 'refs/heads/main'
# runs-on: ubuntu-latest
# timeout-minutes: 40
# env:
# GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# steps:
# - uses: actions/checkout@v3
# - 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 }}-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: 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
# - uses: actions/setup-node@v3
# with:
# node-version: 16
# - 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@v3
# with:
# path: "**/node_modules"
# key: ${{ runner.os }}-cacheNodeModulesLinux-${{ steps.nodeModulesCacheKey.outputs.value }}
# - name: Get yarn cache directory path
# id: yarnCacheDirPath
# if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' }}
# run: echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
# - 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' }}
# env:
# PLAYWRIGHT_SKIP_BROWSER_DOWNLOAD: 1
# ELECTRON_SKIP_BINARY_DOWNLOAD: 1
# run: yarn --frozen-lockfile --network-timeout 180000