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

use custom docker image for circlci #112

Open
wants to merge 11 commits into
base: master
Choose a base branch
from
Open

Conversation

pglock
Copy link
Collaborator

@pglock pglock commented Nov 10, 2017

Use the custom docker image defined in the Dockerfile for testing

@pglock
Copy link
Collaborator Author

pglock commented Nov 10, 2017

There seems to be an error. If the tests are run on circleci, test.js can not connect to localhost.
test.js should also fail if an unhandled promise rejection occurs.

@r03ert0
Copy link
Owner

r03ert0 commented Nov 10, 2017

What I did (outside the docker) to run the tests on localhost was to run the microdraw server in
background, give the server 5 seconds to start, and then launch the tests.

From the .circleci/congif.yml file:

    - run:
           name: Run server in background
           command: 'npm start'
           background: true
    - run: sleep 5
    - run:
           name: Query host
           command: 'node host.js'
    - run:
           name: Test server
           command: 'npm test'

@pglock
Copy link
Collaborator Author

pglock commented Dec 1, 2017

imagehash is used. The test calculates the average hash for every generated image and its reference image. It fails if the difference of the hashes is larger than 10.

The values for hash_size and the allowed difference have been arbitrarily selected and can be changed.

pglock and others added 2 commits December 1, 2017 17:36
@xgui3783
Copy link
Collaborator

xgui3783 commented Dec 2, 2017

I believe the reason for the failed test is how the existing commit behave when github-keys.json is missing.

@xgui3783
Copy link
Collaborator

this PR merges #118 hence will also fix #99

@r03ert0
Copy link
Owner

r03ert0 commented Jun 2, 2020

this PR... we close it? keep it? merge it?

@xgui3783
Copy link
Collaborator

xgui3783 commented Jun 2, 2020

Oh wow, a blast from the past.

I think using image hash to compare the result is probably more scalable than asking contributors to run test on their machine and check the result manually.

I think we can close this for now, but perhaps we can leave an issue? I am hoping that I can get to adapting the code phillip pushed in the new repo.

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.

3 participants