mirror of
https://github.com/LukeHagar/vercel.git
synced 2025-12-09 21:07:46 +00:00
[tests] Use new VERCEL_TEST_TOKEN for tests (#8614)
Use `VERCEL_TEST_TOKEN` for tests
This commit is contained in:
4
.github/workflows/test-integration-cli.yml
vendored
4
.github/workflows/test-integration-cli.yml
vendored
@@ -40,5 +40,5 @@ jobs:
|
|||||||
- run: yarn run build
|
- run: yarn run build
|
||||||
- run: yarn test-integration-cli
|
- run: yarn test-integration-cli
|
||||||
env:
|
env:
|
||||||
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}
|
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
|
||||||
VERCEL_REGISTRATION_URL: ${{ secrets.VERCEL_REGISTRATION_URL }}
|
VERCEL_TEST_REGISTRATION_URL: ${{ secrets.VERCEL_TEST_REGISTRATION_URL }}
|
||||||
|
|||||||
4
.github/workflows/test.yml
vendored
4
.github/workflows/test.yml
vendored
@@ -88,8 +88,8 @@ jobs:
|
|||||||
shell: bash
|
shell: bash
|
||||||
env:
|
env:
|
||||||
VERCEL_CLI_VERSION: ${{ needs.setup.outputs.dplUrl }}/tarballs/vercel.tgz
|
VERCEL_CLI_VERSION: ${{ needs.setup.outputs.dplUrl }}/tarballs/vercel.tgz
|
||||||
VERCEL_TEAM_TOKEN: ${{ secrets.VERCEL_TEAM_TOKEN }}
|
VERCEL_TEST_TOKEN: ${{ secrets.VERCEL_TEST_TOKEN }}
|
||||||
VERCEL_REGISTRATION_URL: ${{ secrets.VERCEL_REGISTRATION_URL }}
|
VERCEL_TEST_REGISTRATION_URL: ${{ secrets.VERCEL_TEST_REGISTRATION_URL }}
|
||||||
FORCE_COLOR: '1'
|
FORCE_COLOR: '1'
|
||||||
|
|
||||||
conclusion:
|
conclusion:
|
||||||
|
|||||||
@@ -200,8 +200,8 @@ async function fetchTokenWithRetry(retries = 5) {
|
|||||||
NOW_TOKEN,
|
NOW_TOKEN,
|
||||||
TEMP_TOKEN,
|
TEMP_TOKEN,
|
||||||
VERCEL_TOKEN,
|
VERCEL_TOKEN,
|
||||||
VERCEL_TEAM_TOKEN,
|
VERCEL_TEST_TOKEN,
|
||||||
VERCEL_REGISTRATION_URL,
|
VERCEL_TEST_REGISTRATION_URL,
|
||||||
} = process.env;
|
} = process.env;
|
||||||
if (VERCEL_TOKEN || NOW_TOKEN || TEMP_TOKEN) {
|
if (VERCEL_TOKEN || NOW_TOKEN || TEMP_TOKEN) {
|
||||||
if (!TEMP_TOKEN) {
|
if (!TEMP_TOKEN) {
|
||||||
@@ -211,7 +211,7 @@ async function fetchTokenWithRetry(retries = 5) {
|
|||||||
}
|
}
|
||||||
return VERCEL_TOKEN || NOW_TOKEN || TEMP_TOKEN;
|
return VERCEL_TOKEN || NOW_TOKEN || TEMP_TOKEN;
|
||||||
}
|
}
|
||||||
if (!VERCEL_TEAM_TOKEN || !VERCEL_REGISTRATION_URL) {
|
if (!VERCEL_TEST_TOKEN || !VERCEL_TEST_REGISTRATION_URL) {
|
||||||
throw new Error(
|
throw new Error(
|
||||||
process.env.CI
|
process.env.CI
|
||||||
? 'Failed to create test deployment. This is expected for 3rd-party Pull Requests. Please run tests locally.'
|
? 'Failed to create test deployment. This is expected for 3rd-party Pull Requests. Please run tests locally.'
|
||||||
@@ -219,10 +219,10 @@ async function fetchTokenWithRetry(retries = 5) {
|
|||||||
);
|
);
|
||||||
}
|
}
|
||||||
try {
|
try {
|
||||||
const res = await _fetch(VERCEL_REGISTRATION_URL, {
|
const res = await _fetch(VERCEL_TEST_REGISTRATION_URL, {
|
||||||
method: 'POST',
|
method: 'POST',
|
||||||
headers: {
|
headers: {
|
||||||
Authorization: `Bearer ${VERCEL_TEAM_TOKEN}`,
|
Authorization: `Bearer ${VERCEL_TEST_TOKEN}`,
|
||||||
},
|
},
|
||||||
});
|
});
|
||||||
if (!res.ok) {
|
if (!res.ok) {
|
||||||
|
|||||||
Reference in New Issue
Block a user