|
| 1 | +name: ci |
| 2 | +on: |
| 3 | + push: |
| 4 | + branches: |
| 5 | + - master |
| 6 | + pull_request: |
| 7 | + types: |
| 8 | + - opened |
| 9 | + - reopened |
| 10 | + - synchronize |
| 11 | +jobs: |
| 12 | + linux-tests: |
| 13 | + name: linux tests |
| 14 | + runs-on: ubuntu-18.04 |
| 15 | + env: |
| 16 | + DISPLAY: ":99" |
| 17 | + ATOM_GITHUB_BABEL_ENV: coverage |
| 18 | + MOCHA_TIMEOUT: 60000 |
| 19 | + UNTIL_TIMEOUT: 30000 |
| 20 | + steps: |
| 21 | + - uses: actions/checkout@v1 |
| 22 | + - name: install Atom |
| 23 | + shell: bash |
| 24 | + run: | |
| 25 | + curl -s -L https://atom.io/download/deb?channel=nightly \ |
| 26 | + -H 'Accept: application/octet-stream' \ |
| 27 | + -o /tmp/atom-amd64.deb |
| 28 | + /sbin/start-stop-daemon --start --quiet \ |
| 29 | + --pidfile /tmp/custom_xvfb_99.pid \ |
| 30 | + --make-pidfile --background \ |
| 31 | + --exec /usr/bin/Xvfb \ |
| 32 | + -- :99 -ac -screen 0 1280x1024x16 |
| 33 | + sudo apt-get update |
| 34 | + sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin |
| 35 | + dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom |
| 36 | + - name: install dependencies |
| 37 | + shell: bash |
| 38 | + run: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm ci |
| 39 | + - name: run tests |
| 40 | + shell: bash |
| 41 | + run: /tmp/atom/usr/bin/atom-nightly --test test/ |
| 42 | + - name: report code coverage |
| 43 | + shell: bash |
| 44 | + env: |
| 45 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 46 | + SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }} |
| 47 | + SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }} |
| 48 | + BUILD_SOURCEBRANCH: ${{ github.event.ref }} |
| 49 | + run: | |
| 50 | + npm run report:coverage |
| 51 | + bash <(curl -s https://codecov.io/bash) \ |
| 52 | + -n "Linux" \ |
| 53 | + -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \ |
| 54 | + -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" |
| 55 | + if: success() || failure() |
| 56 | + |
| 57 | + macos-tests: |
| 58 | + name: macos tests |
| 59 | + runs-on: macos-10.14 |
| 60 | + env: |
| 61 | + ATOM_GITHUB_BABEL_ENV: coverage |
| 62 | + MOCHA_TIMEOUT: 60000 |
| 63 | + UNTIL_TIMEOUT: 30000 |
| 64 | + steps: |
| 65 | + - uses: actions/checkout@v1 |
| 66 | + - name: install Atom |
| 67 | + shell: bash |
| 68 | + run: | |
| 69 | + curl -s -L https://atom.io/download/mac?channel=nightly \ |
| 70 | + -H 'Accept: application/octet-stream' \ |
| 71 | + -o /tmp/atom.zip |
| 72 | + sudo unzip -q /tmp/atom.zip -d /tmp/atom |
| 73 | + - name: install dependencies |
| 74 | + shell: bash |
| 75 | + run: | |
| 76 | + '/tmp/atom/Atom Nightly.app/Contents/Resources/app/apm/bin/apm' ci |
| 77 | + - name: run tests |
| 78 | + shell: bash |
| 79 | + run: | |
| 80 | + '/tmp/atom/Atom Nightly.app/Contents/Resources/app/atom.sh' --test test/ |
| 81 | + - name: report code coverage |
| 82 | + shell: bash |
| 83 | + env: |
| 84 | + CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }} |
| 85 | + SYSTEM_PULLREQUEST_PULLREQUESTNUMBER: ${{ github.event.number }} |
| 86 | + SYSTEM_PULLREQUEST_SOURCEBRANCH: ${{ github.head_ref }} |
| 87 | + BUILD_SOURCEBRANCH: ${{ github.event.ref }} |
| 88 | + run: | |
| 89 | + npm run report:coverage |
| 90 | + bash <(curl -s https://codecov.io/bash) \ |
| 91 | + -n "macOS" \ |
| 92 | + -P "${SYSTEM_PULLREQUEST_PULLREQUESTNUMBER:-}" \ |
| 93 | + -B "${SYSTEM_PULLREQUEST_SOURCEBRANCH:-${BUILD_SOURCEBRANCH}}" |
| 94 | + if: success() || failure() |
| 95 | + |
| 96 | + lint: |
| 97 | + name: lint |
| 98 | + runs-on: ubuntu-18.04 |
| 99 | + env: |
| 100 | + DISPLAY: ":99" |
| 101 | + steps: |
| 102 | + - uses: actions/checkout@v1 |
| 103 | + - name: install Atom |
| 104 | + shell: bash |
| 105 | + run: | |
| 106 | + curl -s -L https://atom.io/download/deb?channel=nightly \ |
| 107 | + -H 'Accept: application/octet-stream' \ |
| 108 | + -o /tmp/atom-amd64.deb |
| 109 | + /sbin/start-stop-daemon --start --quiet \ |
| 110 | + --pidfile /tmp/custom_xvfb_99.pid \ |
| 111 | + --make-pidfile --background \ |
| 112 | + --exec /usr/bin/Xvfb \ |
| 113 | + -- :99 -ac -screen 0 1280x1024x16 |
| 114 | + sudo apt-get update |
| 115 | + sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin |
| 116 | + dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom |
| 117 | + - name: install dependencies |
| 118 | + shell: bash |
| 119 | + run: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm ci |
| 120 | + - name: lint |
| 121 | + shell: bash |
| 122 | + run: npm run lint |
| 123 | + |
| 124 | + snapshot-tests: |
| 125 | + name: snapshot tests |
| 126 | + runs-on: ubuntu-18.04 |
| 127 | + env: |
| 128 | + DISPLAY: ":99" |
| 129 | + ATOM_GITHUB_BABEL_ENV: coverage |
| 130 | + ATOM_GITHUB_TEST_SUITE: snapshot |
| 131 | + steps: |
| 132 | + - uses: actions/checkout@v1 |
| 133 | + - name: install Atom |
| 134 | + shell: bash |
| 135 | + run: | |
| 136 | + curl -s -L https://atom.io/download/deb?channel=nightly \ |
| 137 | + -H 'Accept: application/octet-stream' \ |
| 138 | + -o /tmp/atom-amd64.deb |
| 139 | + /sbin/start-stop-daemon --start --quiet \ |
| 140 | + --pidfile /tmp/custom_xvfb_99.pid \ |
| 141 | + --make-pidfile --background \ |
| 142 | + --exec /usr/bin/Xvfb \ |
| 143 | + -- :99 -ac -screen 0 1280x1024x16 |
| 144 | + sudo apt-get update |
| 145 | + sudo apt-get install -yyq libgconf-2-4 build-essential git libsecret-1-dev gvfs-bin |
| 146 | + dpkg-deb -x /tmp/atom-amd64.deb /tmp/atom |
| 147 | + - name: install dependencies |
| 148 | + shell: bash |
| 149 | + run: /tmp/atom/usr/share/atom-nightly/resources/app/apm/bin/apm ci |
| 150 | + - name: run snapshot tests |
| 151 | + shell: bash |
| 152 | + run: /tmp/atom/usr/bin/atom-nightly --test test/ |
0 commit comments