Unverified Commit 239471c8 authored by Hendrik Liebau's avatar Hendrik Liebau Committed by GitHub

[ci] Exclude `test/production` from deploy tests (#88763)

parent 97532172
......@@ -17,7 +17,7 @@ export default async function getChangedTests() {
if (isCanary) {
console.log(`Skipping flake detection for canary`)
return { devTests: [], prodTests: [] }
return { devTests: [], prodTests: [], deployTests: [] }
}
const diffRevision = await getDiffRevision()
......@@ -44,6 +44,7 @@ export default async function getChangedTests() {
// and if any fail it's flakey
const devTests = []
const prodTests = []
const deployTests = []
for (let file of changedFiles) {
// normalize slashes
......@@ -54,10 +55,11 @@ export default async function getChangedTests() {
.catch(() => false)
if (fileExists && file.match(/^test\/.*?\.test\.(js|ts|tsx)$/)) {
if (
file.startsWith('test/e2e/') ||
file.startsWith('test/integration/')
) {
if (file.startsWith('test/e2e/')) {
devTests.push(file)
prodTests.push(file)
deployTests.push(file)
} else if (file.startsWith('test/integration/')) {
devTests.push(file)
prodTests.push(file)
} else if (file.startsWith('test/prod')) {
......@@ -74,11 +76,12 @@ export default async function getChangedTests() {
{
devTests,
prodTests,
deployTests,
},
null,
2
)
)
return { devTests, prodTests, commitSha }
return { devTests, prodTests, deployTests, commitSha }
}
......@@ -41,9 +41,15 @@ async function main() {
/** @type import('execa').Options */
const EXECA_OPTS_STDIO = { ...EXECA_OPTS, stdio: 'inherit' }
const { devTests, prodTests, commitSha } = await getChangedTests()
let currentTests = testMode === 'dev' ? devTests : prodTests
const { devTests, prodTests, deployTests, commitSha } =
await getChangedTests()
let currentTests =
testMode === 'dev'
? devTests
: testMode === 'deploy'
? deployTests
: prodTests
/**
@type {Array<string[]>}
......
......@@ -46,10 +46,7 @@
}
},
"rules": {
"include": [
"test/e2e/**/*.test.{t,j}s{,x}",
"test/production/**/*.test.{t,j}s{,x}"
],
"include": ["test/e2e/**/*.test.{t,j}s{,x}"],
"exclude": [
"test/e2e/cancel-request/stream-cancel.test.ts",
"test/e2e/new-link-behavior/material-ui.test.ts",
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment