Comments (10)
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.
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.
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.
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.
@feross Let me know if you're happy with this and I'll get it done.
from airtap.
After this maybe release 0.0.4
?
from airtap.
@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 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.
So we put that check in bin/airtap.js
, log something suitable and exit 0.
from airtap.
Yes, I think so.
from airtap.
Related Issues (20)
- Spread browsers across parallel CI jobs
- An in-range update of tape is breaking the build 🚨
- Airtap 4.0.0 HOT 14
- Document how to cache Sauce Connect binary
- Using ESM modules with airtap HOT 15
- Remove deprecated dependencies HOT 8
- airtap does not close sessions/browsers HOT 4
- Option to disable polyfills HOT 5
- Fails to resolve dynamic require HOT 1
- Support for BrowserStack HOT 2
- macOS Safari 11 on Sauce Labs fails with "TypeError: Value is not a sequence" error HOT 6
- Running tests that require secure contexts on Sauce Labs HOT 4
- Engine.io-client xmlhttprequest-ssl high severity vulnerabilities HOT 6
- Hangs indefinitely if no .airtap.yml (without a warning) HOT 2
- No support for local option w/ providers? HOT 7
- re-implement `serve-static` HOT 2
- Github actions stucked on `airtap:browser-context opening 'Default browser'`
- ECMAScript 2022+ HOT 2
- Question: can airtap reduce javascript fatigue? HOT 1
- TypeError: Cannot assign to read only property 'length' of string '' HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from airtap.