-
-
Notifications
You must be signed in to change notification settings - Fork 1.4k
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
Expand Travis matrix to use Webpack v3 and v4 #904
Merged
Merged
Changes from all commits
Commits
Show all changes
22 commits
Select commit
Hold shift + click to select a range
26c7acf
Build: Use prebuild script instead of a separate command on Travis CI
112fac2
Build: Use build stages and expand test matrix to test Webpack v3 & v4
74e7ba5
Build: Use Webpack 3 for non-matrix tasks
884f0c3
Chore: Remove obsolete npm script
8cb5c1c
Chore: Remove debug information from .travis.yml
33df7d1
Build: Run tests without coverage on matrix since it's 2x faster
8b0a5f6
Test: Test make-webpack-config on both Webpack 3 and 4
9a22a3a
Merge branch 'master' into build-travis-ci-stages
4a50323
Build: Use Webpack 4 by default for build stages on Travis CI
224062d
Test: Update fixtures for webpack configs
4f3f9f8
Build: Fix semantic-release step
fe9eff2
Simplify tests, add uglify plugin in production only
sapegin 625a5be
Ignore coverage for webpack version conditions
sapegin 1cc235b
Fix semantic-release command
sapegin 25a49cd
Try to speed up CI by not installing the same version of webpack
sapegin fb7f5b1
Fix integration tests
sapegin 01bec00
Try to fix semantic-release command again
sapegin c1fad23
Use npm ci on CI
c101513
Remove node_modules cache since npm ci will remove it either way
d633b88
Use Node 9 by default to speed up build
fc1d1e0
Fix npm installation script
b5e283d
Fix semantic-release command again
sapegin File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,58 +1,74 @@ | ||
language: node_js | ||
node_js: | ||
- 6 | ||
- 8 | ||
- 9 | ||
cache: | ||
directories: | ||
- node_modules | ||
before_install: | ||
# Upgrade npm | ||
- if [[ `npm -v` != 5* ]]; then npm install -g npm@latest; fi | ||
- 8 | ||
- 6 | ||
env: | ||
- WEBPACK_VERSION= # Current, from package.json | ||
- WEBPACK_VERSION=3 | ||
install: | ||
# Use npm 5.7.x since it has introduced `npm ci` | ||
- if [[ `npm -v` != 5.7* ]]; then npm install -g npm@'>=5.7.1'; fi | ||
- npm ci | ||
before_script: | ||
# Install Webpack version | ||
- if [[ -n "$WEBPACK_VERSION" ]]; then npm install --no-save webpack@$WEBPACK_VERSION; fi | ||
script: | ||
# Run lint | ||
- npm run lint | ||
# Run tests and Danger.js | ||
- | | ||
if [[ "$TRAVIS_NODE_VERSION" == "9" ]]; then | ||
npx danger ci | ||
npm run test:coverage -- --runInBand | ||
else | ||
npm run test:jest -- --runInBand | ||
fi | ||
# Compile code | ||
- npm run compile | ||
# Build all examples | ||
- npm run build | ||
- npm run build:customised | ||
- npm run build:sections | ||
- | | ||
if [[ "$TRAVIS_NODE_VERSION" == "9" ]]; then | ||
# Check that examples really works: no JS errors on load | ||
npm run test:browser:pre | ||
npm run test:browser | ||
npm run test:browser:customised | ||
npm run test:browser:sections | ||
# Run integration tests with cypress | ||
npm run test:cypress:pre | ||
npm run test:cypress:startServer & | ||
npm run test:cypress:startServer:post | ||
npm run test:cypress:run | ||
fi | ||
after_success: | ||
# Make release with semantic-release if needed | ||
- npm install -g semantic-release travis-deploy-once | ||
- npm install --no-save semantic-release-tamia | ||
- travis-deploy-once "semantic-release --analyze-commits semantic-release-tamia/analyzeCommits --verify-release semantic-release-tamia/verifyRelease --generate-notes semantic-release-tamia/generateNotes" | ||
- | | ||
if [[ "$TRAVIS_NODE_VERSION" == "9" ]]; then | ||
# Upload coverage report to Codecov | ||
bash <(curl -s https://codecov.io/bash) | ||
# Update site | ||
if [[ "$TRAVIS_BRANCH" == "master" ]]; then | ||
curl -X POST -d '{}' https://api.netlify.com/build_hooks/591308eba700c425fc1e8a54 | ||
fi | ||
fi | ||
# Run tests without coverage since it's 2x faster | ||
- npm run test:jest -- --runInBand | ||
branches: | ||
except: | ||
- /^v\d+\.\d+\.\d+$/ | ||
stages: | ||
- lint | ||
- test | ||
- integration | ||
- coverage | ||
- release | ||
- name: documentation | ||
if: branch = master | ||
jobs: | ||
include: | ||
- stage: lint | ||
script: | ||
- npm run lint | ||
- npx danger ci | ||
|
||
- stage: integration | ||
script: | ||
# Compile JS | ||
- npm run compile | ||
# Build all examples | ||
- npm run build:basic | ||
- npm run build:customised | ||
- npm run build:sections | ||
# Check that examples really works: no JS errors on load | ||
- npm run test:browser:pre | ||
- npm run test:browser:basic | ||
- npm run test:browser:customised | ||
- npm run test:browser:sections | ||
# Run integration tests with Cypress | ||
- npm run test:cypress:pre | ||
- npm run test:cypress:startServer & | ||
- npm run test:cypress:startServer:post | ||
- npm run test:cypress:run | ||
|
||
- stage: coverage | ||
script: | ||
# Run tests with coverage | ||
- npm run test:coverage -- --runInBand | ||
# Upload coverage report to Codecov | ||
- bash <(curl -s https://codecov.io/bash) | ||
|
||
- stage: release | ||
script: | ||
- npm install --no-save semantic-release-tamia | ||
- >- | ||
npx semantic-release | ||
--analyze-commits semantic-release-tamia/analyzeCommits | ||
--verify-release semantic-release-tamia/verifyRelease | ||
--generate-notes semantic-release-tamia/generateNotes | ||
|
||
- stage: documentation | ||
script: | ||
- curl -X POST -d '{}' https://api.netlify.com/build_hooks/591308eba700c425fc1e8a54 |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This will downgrade 5.8+ to 5.7.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I guess we can check for npm ci directly.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No, it says
>=5.7.1
so it should use latest afaik.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure I get this.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I tried it locally and it installed 5.8.0