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

chore: update travis to have multiple ci stages #742

Merged
merged 14 commits into from
Nov 30, 2020
Merged

Conversation

karrui
Copy link
Contributor

@karrui karrui commented Nov 26, 2020

This PR uses build stages for Travis CI.

Benefits include not sending coverage when tests fail, since the coverage stage is after test stage, and will not be ran if tests fail. This allows us to also rerun builds instead of having to push empty commits to get coveralls working on build failures

should also be faster once we have 5 concurrent jobs.

@karrui
Copy link
Contributor Author

karrui commented Nov 26, 2020

Not really a speed up here, but that should change once we have 5 concurrent jobs lol

@karrui
Copy link
Contributor Author

karrui commented Nov 26, 2020

OR... we can throw all of this away, and use the old script, but leave the coverage generation to after_script. Probably a better idea lol.

@karrui karrui force-pushed the chore/travis-stages branch from ac012af to 19e2fa5 Compare November 26, 2020 15:14
@karrui karrui changed the title chore: update travis to have multiple build stages chore: update travis to only process coverage after all tests pass Nov 26, 2020
@karrui karrui force-pushed the chore/travis-stages branch from 19e2fa5 to 28d63ca Compare November 26, 2020 15:17
@karrui
Copy link
Contributor Author

karrui commented Nov 26, 2020

Decided to merge tests into a single stage, so we can still enjoy coverage only being called if the tests passes

@karrui karrui changed the title chore: update travis to only process coverage after all tests pass chore: update travis to have multiple ci stages Nov 26, 2020
@karrui karrui force-pushed the chore/travis-stages branch from 354a4d1 to 18ee1a8 Compare November 26, 2020 16:48
@karrui karrui force-pushed the chore/travis-stages branch from bfc89ee to 60bfb7d Compare November 26, 2020 16:51
@karrui
Copy link
Contributor Author

karrui commented Nov 26, 2020

That was a whirlwind of fun. I wonder if the time I spent on this will be returned via the dev time savings the team gets :P

@karrui
Copy link
Contributor Author

karrui commented Nov 27, 2020

Might split them up into backend and frontend tests, then coalesce into e2e tests. The bottleneck is now the webpack building of front end, which takes 5 minutes for some reason.

Comment on lines +38 to +58
- stage: Tests
name: Javascript tests
workspaces:
use: build
script:
- travis_retry npm run test-backend-jasmine
- npm run test-frontend
- name: Typescript tests
workspaces:
use: build
script:
- travis_retry npm run test-backend-jest
after_success:
- cat ./coverage/lcov.info | ./node_modules/coveralls/bin/coveralls.js
- name: End-to-end tests
workspaces:
use: build
addons:
chrome: stable
script:
- npm run test-e2e-ci
Copy link
Contributor

Choose a reason for hiding this comment

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

these 3 jobs run in parallel, right?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Yes, but it ends up being (slightly) slower (right now) since Travis is limited to 2 concurrent jobs. Probably what happened when we last looked at it. But with 5 jobs all can finally run at once and then should cut down a couple minutes

Copy link
Contributor

@liangyuanruo liangyuanruo left a comment

Choose a reason for hiding this comment

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

That was a whirlwind of fun. I wonder if the time I spent on this will be returned via the dev time savings the team gets :P

I hope so!

@karrui karrui merged commit 111f1fa into develop Nov 30, 2020
@karrui karrui deleted the chore/travis-stages branch November 30, 2020 05:49
@karrui karrui mentioned this pull request Dec 1, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants