Upgrade to Pro — share decks privately, control downloads, hide ads and more …

Docker Node Testerの話 in 葉桜js

Docker Node Testerの話 in 葉桜js

Docker Node TesterというDocker上でNode.jsのテストを行うツールの紹介です。

Yosuke Furukawa

April 14, 2014
Tweet

More Decks by Yosuke Furukawa

Other Decks in Programming

Transcript

  1. Docker Node Tester
    Node.js test powered by Docker

    View full-size slide

  2. Docker ὑ node.js

    View full-size slide

  3. Use Docker when your tests

    View full-size slide

  4. Node.js v0.12Ͱมߋ͸ଟ͍

    View full-size slide

  5. V8 όʔδϣϯΞοϓ
    C++ addonͷॻ͖ํมߋ
    ES6 feature ͷಋೖ
    ίΞϞδϡʔϧͷbugfix

    View full-size slide

  6. ͜Ε·Ͱͷίʔυ͕ͦͷ··
    ಈ͘อূ͸ͳ͍ɻ
    (※΋ͪΖΜޓ׵ੑ͸έΞ͞ΕͯΔ͕…)

    View full-size slide

  7. ࠷৽όʔδϣϯͰಈ࡞Ͱ͖Δ
    ͷ͔ɺςετ͠·͠ΐ͏

    View full-size slide

  8. ͦ͜Ͱ
    Docker Node Tester
    https://github.com/rvagg/dnt

    View full-size slide

  9. ઃఆϑΝΠϧ(.dntrc)Λॻ͚͹Docker
    ͰNode.jsͷόʔδϣϯΛมߋͯ͠

    ౎౓ςετͯ͘͠ΕΔ
    NODE_VERSIONS="\
    master \
    v0.11.9 \
    v0.10.22 \
    v0.8.26 \
    "
    OUTPUT_PREFIX="nan-"
    TEST_CMD="\
    cd /dnt/test/ && \
    npm install && \
    node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild && \
    node_modules/.bin/tap js/*-test.js; \
    "
    EOUSDͷྫ

    View full-size slide

  10. ઃఆϑΝΠϧ(.dntrc)Λॻ͚͹Docker
    ͰNode.jsͷόʔδϣϯΛมߋͯ͠

    ౎౓ςετͯ͘͠ΕΔ
    NODE_VERSIONS="\
    master \
    v0.11.9 \
    v0.10.22 \
    v0.8.26 \
    "
    OUTPUT_PREFIX="nan-"
    TEST_CMD="\
    cd /dnt/test/ && \
    npm install && \
    node_modules/.bin/node-gyp --nodedir /usr/src/node/ rebuild && \
    node_modules/.bin/tap js/*-test.js; \
    "
    EOUSDͷྫ
    UFTUର৅όʔδϣϯ
    UFTUίϚϯυ

    View full-size slide

  11. travis ͩͱ͍͍ͪͪpush໘౗

    View full-size slide

  12. Docker Node Tester͸खݩͷshell
    ͕dockerΛىಈͤͯ͞ςετ͢Δͨ
    Ίɺpushෆཁɻ

    View full-size slide

  13. cool isn’t it ?! :D

    View full-size slide