зеркало из https://github.com/github/docs.git
add new conditional test runs helper
This commit is contained in:
Родитель
4b1988d8a8
Коммит
117bd5fcb8
|
@ -0,0 +1,9 @@
|
|||
const runningActionsOnInternalRepo = process.env.GITHUB_ACTIONS === 'true' && process.env.GITHUB_REPOSITORY === 'github/docs-internal'
|
||||
|
||||
const testViaActionsOnly = runningActionsOnInternalRepo ? test : test.skip
|
||||
const describeViaActionsOnly = runningActionsOnInternalRepo ? describe : describe.skip
|
||||
|
||||
module.exports = {
|
||||
testViaActionsOnly,
|
||||
describeViaActionsOnly
|
||||
}
|
|
@ -1,12 +1,11 @@
|
|||
const lodash = require('lodash')
|
||||
const enterpriseServerReleases = require('../../lib/enterprise-server-releases')
|
||||
const { get, getDOM, head } = require('../helpers/supertest')
|
||||
const { describeViaActionsOnly } = require('../helpers/conditional-runs')
|
||||
const path = require('path')
|
||||
const nonEnterpriseDefaultVersion = require('../../lib/non-enterprise-default-version')
|
||||
const { loadPages } = require('../../lib/pages')
|
||||
|
||||
const describeInternalOnly = process.env.GITHUB_REPOSITORY === 'github/docs-internal' ? describe : describe.skip
|
||||
|
||||
describe('server', () => {
|
||||
jest.setTimeout(60 * 1000)
|
||||
|
||||
|
@ -358,7 +357,7 @@ describe('server', () => {
|
|||
})
|
||||
})
|
||||
|
||||
describeInternalOnly('Early Access articles', () => {
|
||||
describeViaActionsOnly('Early Access articles', () => {
|
||||
let hiddenPageHrefs, hiddenPages
|
||||
|
||||
beforeAll(async (done) => {
|
||||
|
|
|
@ -1,9 +1,6 @@
|
|||
const fs = require('fs')
|
||||
const path = require('path')
|
||||
|
||||
const { GITHUB_ACTIONS, GITHUB_REPOSITORY } = process.env
|
||||
const runningActionsOnInternalRepo = GITHUB_ACTIONS === 'true' && GITHUB_REPOSITORY === 'github/docs-internal'
|
||||
const testViaActionsOnly = runningActionsOnInternalRepo ? test : test.skip
|
||||
const { testViaActionsOnly } = require('../helpers/conditional-runs')
|
||||
|
||||
describe('cloning early-access', () => {
|
||||
testViaActionsOnly('the content directory exists', async () => {
|
||||
|
|
Загрузка…
Ссылка в новой задаче