WIP reverting to simulating Travis CI test environment and setting GITHUB_API_URL
This commit is contained in:
parent
1c85b88c9f
commit
7beb13af45
@ -33,9 +33,10 @@ const env = {
|
|||||||
...npmRegistry.authEnv,
|
...npmRegistry.authEnv,
|
||||||
CI: 'true',
|
CI: 'true',
|
||||||
GH_TOKEN: gitbox.gitCredential,
|
GH_TOKEN: gitbox.gitCredential,
|
||||||
GITHUB_URL: mockServer.url,
|
TRAVIS: 'true',
|
||||||
GITHUB_EVENT_NAME: 'push',
|
TRAVIS_BRANCH: 'master',
|
||||||
GITHUB_REF: 'master'
|
TRAVIS_PULL_REQUEST: 'false',
|
||||||
|
GITHUB_API_URL: mockServer.url,
|
||||||
};
|
};
|
||||||
|
|
||||||
// ignore certain environment variables that are set on CI and that would interfere with our test setup,
|
// ignore certain environment variables that are set on CI and that would interfere with our test setup,
|
||||||
@ -257,7 +258,7 @@ test('Release patch, minor and major versions', async (t) => {
|
|||||||
await gitPush('origin', 'next', {cwd});
|
await gitPush('origin', 'next', {cwd});
|
||||||
await gitCommits(['feat: foo\n\n BREAKING CHANGE: bar'], {cwd});
|
await gitCommits(['feat: foo\n\n BREAKING CHANGE: bar'], {cwd});
|
||||||
t.log('$ semantic-release');
|
t.log('$ semantic-release');
|
||||||
({stdout, exitCode} = await execa(cli, [], {env: {...env, GITHUB_REF: 'next'}, cwd}));
|
({stdout, exitCode} = await execa(cli, [], {env: {...env, TRAVIS_BRANCH: 'next'}, cwd}));
|
||||||
t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
|
t.regex(stdout, new RegExp(`Published GitHub release: release-url/${version}`));
|
||||||
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
|
t.regex(stdout, new RegExp(`Publishing version ${version} to npm registry`));
|
||||||
t.is(exitCode, 0);
|
t.is(exitCode, 0);
|
||||||
|
Loading…
x
Reference in New Issue
Block a user