Git Product home page Git Product logo

Comments (10)

vweevers avatar vweevers commented on August 15, 2024

Agree that we should handle this.

How about skipping tests if process.env.TRAVIS_SECURE_ENV_VARS !== 'true'?

From https://docs.travis-ci.com/user/environment-variables/#Default-Environment-Variables:

TRAVIS_SECURE_ENV_VARS:

  • set to true if there are any encrypted environment variables.
  • set to false if no encrypted environment variables are available.

from airtap.

feross avatar feross commented on August 15, 2024

Sounds good to me! Let's make sure to print a message so the user knows what's happening if they read the logs.

Note, I don't think you want to skip tests if process.env.TRAVIS_SECURE_ENV_VARS is undefined which will happen when e.g. running locally, so how about this test:

var shouldSkip = process.env.TRAVIS_SECURE_ENV_VARS === 'false'

from airtap.

vweevers avatar vweevers commented on August 15, 2024

Sounds good to me! Let's make sure to print a message so the user knows what's happening if they read the logs.

👍

Note, I don't think you want to skip tests if process.env.TRAVIS_SECURE_ENV_VARS is undefined

Ah right. SGTM.

from airtap.

ralphtheninja avatar ralphtheninja commented on August 15, 2024

So we shouldn't run test/integration/tape-sauce.js on PRs but the rest of the tests should be fine? We need to make a seam somewhere then so we can split up the tests. Maybe just in test/index.js, e.g.:

require('./unit/aggregate-browsers')
require('./unit/browserify-builder')
require('./unit/capabilities')
require('./unit/flatten-browser')
require('./integration/tape-electron')
require('./integration/tape-phantom')

if (process.env.TRAVIS_SECURE_ENV_VARS !== 'false') {
  require('./integration/tape-sauce')
}

from airtap.

ralphtheninja avatar ralphtheninja commented on August 15, 2024

@feross Let me know if you're happy with this and I'll get it done.

from airtap.

ralphtheninja avatar ralphtheninja commented on August 15, 2024

After this maybe release 0.0.4?

from airtap.

feross avatar feross commented on August 15, 2024

@ralphtheninja This issue is about adding a feature that will allow users of airtap to skip running tests entirely on PRs, since those lack credentials.

So, I could add airtap to a project like buffer without needing to write code to detect if we're in a Travis PR. We want to skip airtap in PRs, because the credentials are missing. See this line: https://github.com/feross/buffer/blob/c0c91b75e43d5ef82c246e4d8f3746b5e779aded/bin/test.js#L7-L8

If we need the same thing for our own tests, it would be nice to just implement this for everyone, either via a --skip-missing-credentials or --skip-pr flag, or just defaulting to this behavior if that's what folks think makes the most sense. Then we can just use the flag in our own airtap test suite :)

from airtap.

ralphtheninja avatar ralphtheninja commented on August 15, 2024

@ralphtheninja This issue is about adding a feature that will allow users of airtap to skip running tests entirely on PRs, since those lack credentials.

Oh right. Gotcha!

from airtap.

ralphtheninja avatar ralphtheninja commented on August 15, 2024

So we put that check in bin/airtap.js, log something suitable and exit 0.

from airtap.

feross avatar feross commented on August 15, 2024

Yes, I think so.

from airtap.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.