Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Build Tooling: Split JavaScript tasks to individual jobs #15229

Merged
merged 3 commits into from
May 9, 2019
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 26 additions & 3 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,17 +27,40 @@ before_install:

jobs:
include:
- name: JS unit tests
env: WP_VERSION=latest
- name: Lint
before_install:
- nvm install --latest-npm
install:
- npm ci
script:
- npm run build
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, ideally we don't need npm run build at all.

- npm run lint

- name: Build artifacts
before_install:
- nvm install --latest-npm
install:
- npm ci
script:
- npm run check-local-changes

- name: License compatibility
before_install:
- nvm install --latest-npm
install:
- npm ci
script:
- npm run check-licenses

- name: JavaScript unit tests
before_install:
- nvm install --latest-npm
install:
- npm ci
script:
# It's not necessary to run the full build, since Jest can interpret
# source files with `babel-jest`. Some packages have their own custom
# build tasks, however. These must be run.
- npx lerna run build
- npm run test-unit -- --ci --maxWorkers=2 --cacheDirectory="$HOME/.jest-cache"

- name: PHP unit tests (Docker)
Expand Down