name: CI on: push: branches: - master - release/* pull_request: branches: - master - release/* jobs: hygiene: name: Hygiene check runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2-beta with: node-version: 12 - name: Cache node modules id: cacheNodeModules uses: actions/cache@v2 with: path: '**/node_modules' key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }} restore-keys: ${{ runner.os }}-cacheNodeModules- - name: Cache /build/ scripts id: cacheBuildScripts uses: actions/cache@v2 with: path: build/**/*.js key: ${{ runner.os }}-cacheBuildScripts-${{ hashFiles('build/yarn.lock', 'build/tsconfig.json', 'build/tsconfig.build.json', 'build/**/*.ts', '!**/node_modules/**/*.ts') }} - name: Execute yarn if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' || steps.cacheBuildScripts.outputs.cache-hit != 'true' || steps.cachePlaywright.outputs.cache-hit != 'true' }} run: yarn --frozen-lockfile - name: Run Hygiene Checks run: yarn gulp hygiene linux: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 # 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 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-beta with: node-version: 12 - name: Cache node modules id: cacheNodeModules uses: actions/cache@v2 with: path: '**/node_modules' key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }} restore-keys: ${{ runner.os }}-cacheNodeModules- - name: Cache /build/ scripts id: cacheBuildScripts uses: actions/cache@v2 with: path: build/**/*.js key: ${{ runner.os }}-cacheBuildScripts-${{ hashFiles('build/yarn.lock', 'build/tsconfig.json', 'build/tsconfig.build.json', 'build/**/*.ts', '!**/node_modules/**/*.ts') }} - name: Cache playwright id: cachePlaywright uses: actions/cache@v2 with: path: ~/.cache/ms-playwright key: ${{ runner.os }}-cachePlaywright-${{ hashFiles('yarn.lock') }} - name: Execute yarn if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' || steps.cacheBuildScripts.outputs.cache-hit != 'true' || steps.cachePlaywright.outputs.cache-hit != 'true' }} run: yarn --frozen-lockfile - name: Download Electron run: yarn electron x64 - name: Run Valid Layers Checks run: yarn valid-layers-check - name: Compile Sources run: yarn compile - name: Download Built-in Extensions run: yarn download-builtin-extensions - name: Run Unit Tests (Electron) run: DISPLAY=:10 ./scripts/test.sh - name: Run Unit Tests (Browser) run: DISPLAY=:10 yarn test-browser --browser chromium - name: Run Integration Tests (Electron) run: DISPLAY=:10 ./scripts/test-integration.sh # windows: # runs-on: windows-2016 # env: # CHILD_CONCURRENCY: "1" # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # steps: # - uses: actions/checkout@v1 # - uses: actions/setup-node@v1 # with: # node-version: 10 # - uses: actions/setup-python@v1 # with: # python-version: '2.x' # - run: yarn --frozen-lockfile # name: Install Dependencies # - run: yarn electron # name: Download Electron # - run: yarn gulp hygiene # name: Run Hygiene Checks # - run: yarn monaco-compile-check # name: Run Monaco Editor Checks # - run: yarn valid-layers-check # name: Run Valid Layers Checks # - run: yarn compile # name: Compile Sources # - run: yarn download-builtin-extensions # name: Download Built-in Extensions # - run: .\scripts\test.bat --tfs "Unit Tests" # name: Run Unit Tests (Electron) # - run: yarn test-browser --browser chromium # name: Run Unit Tests (Browser) # - run: .\scripts\test-integration.bat --tfs "Integration Tests" # name: Run Integration Tests (Electron) # darwin: # runs-on: macos-latest # env: # CHILD_CONCURRENCY: "1" # GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} # steps: # - uses: actions/checkout@v1 # - uses: actions/setup-node@v1 # with: # node-version: 10 # - run: yarn --frozen-lockfile # name: Install Dependencies # - run: yarn electron x64 # name: Download Electron # - run: yarn gulp hygiene # name: Run Hygiene Checks # - run: yarn monaco-compile-check # name: Run Monaco Editor Checks # - run: yarn valid-layers-check # name: Run Valid Layers Checks # - run: yarn compile # name: Compile Sources # - run: yarn download-builtin-extensions # name: Download Built-in Extensions # - run: ./scripts/test.sh --tfs "Unit Tests" # name: Run Unit Tests (Electron) # - run: yarn test-browser --browser chromium --browser webkit # name: Run Unit Tests (Browser) # - run: ./scripts/test-integration.sh --tfs "Integration Tests" # name: Run Integration Tests (Electron) monaco: name: Monaco Editor checks runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} steps: - uses: actions/checkout@v2 - uses: actions/setup-node@v2-beta with: node-version: 12 - name: Cache node modules id: cacheNodeModules uses: actions/cache@v2 with: path: '**/node_modules' key: ${{ runner.os }}-cacheNodeModules-${{ hashFiles('.yarnrc', 'remote/.yarnrc', '**/yarn.lock', '!**/node_modules/**/yarn.lock', '!**/.*/**/yarn.lock') }} restore-keys: ${{ runner.os }}-cacheNodeModules- - name: Cache /build/ scripts id: cacheBuildScripts uses: actions/cache@v2 with: path: build/**/*.js key: ${{ runner.os }}-cacheBuildScripts-${{ hashFiles('build/yarn.lock', 'build/tsconfig.json', 'build/tsconfig.build.json', 'build/**/*.ts', '!**/node_modules/**/*.ts') }} - name: Execute yarn if: ${{ steps.cacheNodeModules.outputs.cache-hit != 'true' || steps.cacheBuildScripts.outputs.cache-hit != 'true' }} run: yarn --frozen-lockfile - name: Run Monaco Editor Checks run: yarn monaco-compile-check - name: Editor Distro & ESM Bundle run: yarn gulp editor-esm-bundle