Merge pull request #19096 from atom/lint-early-and-fail-fast

Update CI scripts to lint early and fail fast
This commit is contained in:
Jason Rudolph 2019-04-03 20:49:17 -04:00 committed by GitHub
commit b50818e773
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
5 changed files with 38 additions and 21 deletions

View File

@ -28,11 +28,12 @@ install:
- nvm install $NODE_VERSION
- nvm use --delete-prefix $NODE_VERSION
- npm install --global npm@6.2.0
- script/build --create-debian-package --create-rpm-package --compress-artifacts
- script/bootstrap
script:
- script/lint
- script/test
script: >
script/lint &&
script/build --no-bootstrap --create-debian-package --create-rpm-package --compress-artifacts &&
script/test
cache:
directories:

View File

@ -2,9 +2,13 @@
'use strict'
// Run bootstrap first to ensure all the dependencies used later in this script
// are installed.
require('./bootstrap')
if (process.argv.includes('--no-bootstrap')) {
console.log('Skipping bootstrap')
} else {
// Bootstrap first to ensure all the dependencies used later in this script
// are installed.
require('./bootstrap')
}
// Needed so we can require src/module-cache.coffee during generateModuleCache
require('coffee-script/register')

View File

@ -12,15 +12,18 @@ jobs:
container: atom-linux-ci
steps:
- script: script/build --create-debian-package --create-rpm-package --compress-artifacts
- script: script/bootstrap
displayName: Bootstrap build environment
- script: script/lint
displayName: Run linter
- script: script/build --no-bootstrap --create-debian-package --create-rpm-package --compress-artifacts
env:
GITHUB_TOKEN: $(GITHUB_TOKEN)
ATOM_RELEASE_VERSION: $(ReleaseVersion)
displayName: Build Atom
- script: script/lint
displayName: Run linter
- script: script/test
env:
CI: true

View File

@ -19,11 +19,17 @@ jobs:
- script: npm install --global npm@6.2.0
displayName: Update npm
- script: script/bootstrap
displayName: Bootstrap build environment
- script: script/lint
displayName: Run linter
- script: |
if [ $IS_RELEASE_BRANCH == "true" ] || [ $IS_SIGNED_ZIP_BRANCH == "true" ]; then
script/build --code-sign --compress-artifacts
script/build --no-bootstrap --code-sign --compress-artifacts
else
script/build --compress-artifacts
script/build --no-bootstrap --compress-artifacts
fi
displayName: Build Atom
env:
@ -36,9 +42,6 @@ jobs:
ATOM_MAC_CODE_SIGNING_KEYCHAIN: $(ATOM_MAC_CODE_SIGNING_KEYCHAIN)
ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD: $(ATOM_MAC_CODE_SIGNING_KEYCHAIN_PASSWORD)
- script: script/lint
displayName: Run linter
- script: |
osascript -e 'tell application "System Events" to keystroke "x"' # clear screen saver
caffeinate -s script/test # Run with caffeinate to prevent screen saver

View File

@ -36,6 +36,17 @@ jobs:
npm install
displayName: Install Windows build dependencies
- script: |
node script\vsts\windows-run.js script\bootstrap.cmd
env:
BUILD_ARCH: $(buildArch)
displayName: Bootstrap build environment
- script: node script\vsts\windows-run.js script\lint.cmd
env:
BUILD_ARCH: $(buildArch)
displayName: Run linter
- script: |
IF NOT EXIST C:\tmp MKDIR C:\tmp
SET SQUIRREL_TEMP=C:\tmp
@ -61,11 +72,6 @@ jobs:
IS_SIGNED_ZIP_BRANCH: $(IsSignedZipBranch)
displayName: Build Atom
- script: node script\vsts\windows-run.js script\lint.cmd
env:
BUILD_ARCH: $(buildArch)
displayName: Run linter
- script: node script\vsts\windows-run.js script\test.cmd
env:
CI: true