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

ci: 🎡 Use docker-compose for CI #97

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

ikedam
Copy link

@ikedam ikedam commented Feb 23, 2020

  • Use docker-compose to run tests on TravisCI
  • Fix tests failed for the latest Chrome
  • Fix tslint errors

TravisCI is failing for:

WARNING: The following packages cannot be authenticated!

  google-chrome-stable

E: There were unauthenticated packages and -y was used without --allow-unauthenticated
apt-get.diagnostics

apt-get install failed

The command "sudo -E apt-get -yq --no-install-suggests --no-install-recommends $(travis_apt_get_options) install google-chrome-stable graphicsmagick" failed and exited with 100 during .

And I believe the test will fail just link azachar/screenshoter-report-analyzer#6 even if fix the above error in this way:

$ sh -e /etc/init.d/xvfb start
sh: 0: Can't open /etc/init.d/xvfb
The command "sh -e /etc/init.d/xvfb start" failed and exited with 127 during .
Your build has been stopped.

* Use docker-compose to run tests on TravisCI
* Fix tests failed for the latest Chrome
* Fix tslint errors
Comment on lines +13 to +20
- TRAVIS=1
- TRAVIS_JOB_NUMBER=dummy
- TRAVIS_BRANCH=dummy
- TRAVIS_COMMIT=dummy
- TRAVIS_TAG=dummy
- TRAVIS_REPO_SLUG=dummy
- TRAVIS_COMMIT_MESSAGE=dummy
- TRAVIS_BUILD_ID=dummy
Copy link
Author

Choose a reason for hiding this comment

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

Tests always fail on local environments without these definitions.
Definitions like - TRAVIS (without =xxxx) allows inherit specified environment variables and make tests pass only on TravisCI, or you can have them it pass locally if you define those variables. Please let me know if you like that.

- /app/node_modules
working_dir: /app
environment:
- SELENIUM_URL=http://selenium:4444/wd/hub
Copy link
Author

Choose a reason for hiding this comment

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

docker-compose launches 4 containers: app, selenium, firefox, chrome.

  • app runs tests.
  • Protractor on app connects to selenium to launch web browsers and control them.
  • firefox and chrome registers themselves to selenium. selenium connects to firefox or chromes based on the capability specified by protractor.

@@ -447,7 +447,7 @@ protractorUtil.registerJasmineReporter = function(context) {
prefix: ''
};
global.browser.getProcessedConfig().then(function(config) {
if(config.capabilities) {
if (config.capabilities) {
Copy link
Author

Choose a reason for hiding this comment

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

ESLint error: Expected space(s) after "if" keyword-spacing

expect(report.tests[4].description).toMatch('\\[[M|L]\\] should list todos');
expect(report.tests[4].fullName).toMatch('\\[[M|L]\\] angularjs homepage todo list should list todos');
expect(report.tests[5].description).toMatch('\\[[M|L]\\] should add a todo');
expect(report.tests[5].fullName).toMatch('\\[[M|L]\\] angularjs homepage todo list should add a todo');
Copy link
Author

Choose a reason for hiding this comment

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

ESLint error: Unnecessary escape character: \[ no-useless-escape Unnecessary escape character: \] no-useless-escape

@@ -4,7 +4,6 @@ exports.config = {
seleniumAddress: env.seleniumAddress,
framework: 'jasmine2',
specs: ['../protractor/angularjs-homepage-disabled-test.js'],
useBlockingProxy: true,
Copy link
Author

Choose a reason for hiding this comment

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

Somehow this causes tests fail (protractor raises an error Error from wait for angular).
This isn't specified in default.js and useBlockingProxy looks have nothing to do with the purpose of bug55, and I simply remove that.

@@ -128,14 +128,14 @@ describe("Screenshoter unit", function() {

it("should merge user config", function() {
screenshoter.config = {
screenshotPath: 'REPORTS',
screenshotPath: 'REPORTS2',
Copy link
Author

Choose a reason for hiding this comment

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

REPORTS causes an error Error: EEXIST: file already exists, mkdir '/app/REPORTS' on Windows. It looks conflict with the existing reports. I changed the directory name to avoid the problem though it rather looks like an issue of mkdirp.

@ikedam ikedam requested a review from azachar February 23, 2020 02:50
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.

1 participant