[tests] Don't run tests in forks (#3713)

There is no need to run the tests in a fork because when the forked repo submits a PR to this repo, the tests will run.
This commit is contained in:
Steven
2020-01-31 18:49:56 -05:00
committed by GitHub
parent 300558f24e
commit 5e8541b936
2 changed files with 11 additions and 2 deletions

View File

@@ -2,6 +2,14 @@ const { execSync, spawn } = require('child_process');
const { join, relative } = require('path');
const { readdirSync } = require('fs');
if (
process.env.GITHUB_REPOSITORY &&
process.env.GITHUB_REPOSITORY !== 'zeit/now'
) {
console.log('Detected fork, skipping tests');
return;
}
process.chdir(join(__dirname, '..'));
async function main() {