Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions .github/workflows/integration-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,6 +69,7 @@ jobs:
# We set a flag so we can skip tests that access Netlify API
NETLIFY_TEST_DISABLE_LIVE:
${{ github.event_name == 'pull_request' && github.event.pull_request.head.repo.fork == true }}
NETLIFY_TEST_ACCOUNT_SLUG: 'netlify-integration-testing'
NETLIFY_AUTH_TOKEN: ${{ secrets.NETLIFY_AUTH_TOKEN }}
# NETLIFY_TEST_GITHUB_TOKEN is used to avoid reaching GitHub API limits in exec-fetcher.js
NETLIFY_TEST_GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
Expand Down
10 changes: 8 additions & 2 deletions tests/integration/commands/deploy/deploy.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import { fileURLToPath } from 'url'
import { load } from 'cheerio'
import execa from 'execa'
import fetch from 'node-fetch'
import { afterAll, beforeAll, describe, expect, test } from 'vitest'
import { afterAll, beforeAll, describe, expect, test, vi } from 'vitest'

import { callCli } from '../../utils/call-cli.js'
import { createLiveTestSite, generateSiteName } from '../../utils/create-live-test-site.js'
Expand Down Expand Up @@ -86,7 +86,13 @@ const context: { account: unknown; siteId: string } = {
account: undefined,
}

describe.skipIf(process.env.NETLIFY_TEST_DISABLE_LIVE === 'true').concurrent('commands/deploy', () => {
const disableLiveTests = process.env.NETLIFY_TEST_DISABLE_LIVE === 'true'

// Running multiple entire build + deploy cycles concurrently results in a lot of network requests that may
// cause resource contention anyway, so lower the default concurrency from 5 to 3.
vi.setConfig({ maxConcurrency: 3 })

describe.skipIf(disableLiveTests).concurrent('commands/deploy', { timeout: 300_000 }, () => {
beforeAll(async () => {
const { account, siteId } = await createLiveTestSite(SITE_NAME)
context.siteId = siteId
Expand Down
Loading