ci.yml 4.5 KB
Newer Older
E
Edward Thomson 已提交
1 2
name: CI

J
João Moreno 已提交
3 4 5 6 7 8 9 10 11
# on:
#   push:
#     branches:
#       - master
#       - release/*
#   pull_request:
#     branches:
#       - master
#       - release/*
E
Edward Thomson 已提交
12 13 14 15

jobs:
  linux:
    runs-on: ubuntu-latest
J
Joao Moreno 已提交
16 17
    env:
      CHILD_CONCURRENCY: "1"
J
Joao Moreno 已提交
18
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
E
Edward Thomson 已提交
19 20 21 22 23
    steps:
    - uses: actions/checkout@v1
    # TODO: rename azure-pipelines/linux/xvfb.init to github-actions
    - run: |
        sudo apt-get update
24
        sudo apt-get install -y libxkbfile-dev pkg-config libsecret-1-dev libxss1 dbus xvfb libgtk-3-0 libgbm1
E
Edward Thomson 已提交
25 26 27 28 29 30 31 32 33 34 35 36 37
        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
      name: Setup Build Environment
    - uses: actions/setup-node@v1
      with:
        node-version: 10
    # TODO: cache node modules
    - run: yarn --frozen-lockfile
      name: Install Dependencies
    - run: yarn electron x64
      name: Download Electron
38
    - run: yarn gulp hygiene
E
Edward Thomson 已提交
39 40 41
      name: Run Hygiene Checks
    - run: yarn monaco-compile-check
      name: Run Monaco Editor Checks
42 43
    - run: yarn valid-layers-check
      name: Run Valid Layers Checks
E
Edward Thomson 已提交
44 45 46 47 48
    - run: yarn compile
      name: Compile Sources
    - run: yarn download-builtin-extensions
      name: Download Built-in Extensions
    - run: DISPLAY=:10 ./scripts/test.sh --tfs "Unit Tests"
49
      name: Run Unit Tests (Electron)
50 51
    - run: DISPLAY=:10 yarn test-browser --browser chromium
      name: Run Unit Tests (Browser)
E
Edward Thomson 已提交
52
    - run: DISPLAY=:10 ./scripts/test-integration.sh --tfs "Integration Tests"
53
      name: Run Integration Tests (Electron)
54 55 56

  windows:
    runs-on: windows-2016
J
Joao Moreno 已提交
57 58
    env:
      CHILD_CONCURRENCY: "1"
J
Joao Moreno 已提交
59
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
60 61 62 63 64 65 66 67 68 69 70 71
    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
J
Johannes Rieken 已提交
72
    - run: yarn gulp hygiene
73 74 75
      name: Run Hygiene Checks
    - run: yarn monaco-compile-check
      name: Run Monaco Editor Checks
76 77
    - run: yarn valid-layers-check
      name: Run Valid Layers Checks
78 79 80 81 82
    - run: yarn compile
      name: Compile Sources
    - run: yarn download-builtin-extensions
      name: Download Built-in Extensions
    - run: .\scripts\test.bat --tfs "Unit Tests"
83 84 85
      name: Run Unit Tests (Electron)
    - run: yarn test-browser --browser chromium
      name: Run Unit Tests (Browser)
86
    - run: .\scripts\test-integration.bat --tfs "Integration Tests"
87
      name: Run Integration Tests (Electron)
E
Edward Thomson 已提交
88 89 90

  darwin:
    runs-on: macos-latest
J
Joao Moreno 已提交
91 92
    env:
      CHILD_CONCURRENCY: "1"
J
Joao Moreno 已提交
93
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
E
Edward Thomson 已提交
94 95 96 97 98 99 100 101 102
    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
J
Johannes Rieken 已提交
103
    - run: yarn gulp hygiene
E
Edward Thomson 已提交
104 105 106
      name: Run Hygiene Checks
    - run: yarn monaco-compile-check
      name: Run Monaco Editor Checks
107 108
    - run: yarn valid-layers-check
      name: Run Valid Layers Checks
E
Edward Thomson 已提交
109 110 111 112 113
    - run: yarn compile
      name: Compile Sources
    - run: yarn download-builtin-extensions
      name: Download Built-in Extensions
    - run: ./scripts/test.sh --tfs "Unit Tests"
114 115 116
      name: Run Unit Tests (Electron)
    - run: yarn test-browser --browser chromium --browser webkit
      name: Run Unit Tests (Browser)
E
Edward Thomson 已提交
117
    - run: ./scripts/test-integration.sh --tfs "Integration Tests"
118
      name: Run Integration Tests (Electron)
119 120

  monaco:
121
    runs-on: ubuntu-latest
122 123 124 125 126
    env:
      CHILD_CONCURRENCY: "1"
      GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
    steps:
    - uses: actions/checkout@v1
127 128 129 130 131 132 133 134 135
    # TODO: rename azure-pipelines/linux/xvfb.init to github-actions
    - 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
      name: Setup Build Environment
136 137 138 139 140 141 142
    - uses: actions/setup-node@v1
      with:
        node-version: 10
    - run: yarn --frozen-lockfile
      name: Install Dependencies
    - run: yarn monaco-compile-check
      name: Run Monaco Editor Checks
P
Peng Lyu 已提交
143
    - run: yarn gulp editor-esm-bundle
144
      name: Editor Distro & ESM Bundle