Skip to content

Commit

Permalink
fix(generators): Add schema selection to CI test matrix
Browse files Browse the repository at this point in the history
  • Loading branch information
daffl committed Jan 31, 2023
1 parent 7b8250b commit f49bfe2
Showing 1 changed file with 9 additions and 7 deletions.
16 changes: 9 additions & 7 deletions packages/generators/test/generators.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,21 +18,23 @@ import { listAllFiles } from '@feathershq/pinion/lib/utils'

const matrix = {
language: ['js', 'ts'] as const,
framework: ['koa', 'express'] as const
framework: ['koa', 'express'] as const,
schema: ['typebox', 'json'] as const
}

const defaultCombination = {
language: process.env.FEATHERS_LANGUAGE || 'ts',
framework: process.env.FEATHERS_FRAMEWORK || 'koa'
framework: process.env.FEATHERS_FRAMEWORK || 'koa',
schema: process.env.FEATHERS_SCHEMA || 'typebox'
}

const combinations =
process.version > 'v16.0.0' ? (process.env.CI ? combinate(matrix as any) : [defaultCombination]) : []

describe('@feathersjs/generators', () => {
for (const { language, framework } of combinations) {
for (const { language, framework, schema } of combinations) {
describe(`${language} ${framework} app`, () => {
const name = `feathers_${language}_${framework}`
const name = `feathers_${language}_${framework}_${schema}`

let context: FeathersBaseContext
let cwd: string
Expand All @@ -56,7 +58,7 @@ describe('@feathersjs/generators', () => {
connectionString: `${name}.sqlite`,
transports: ['rest', 'websockets'],
authStrategies: ['local', 'github'],
schema: 'typebox'
schema
},
{ cwd }
)
Expand Down Expand Up @@ -107,7 +109,7 @@ describe('@feathersjs/generators', () => {
path: 'messages',
authentication: true,
type: 'mongodb',
schema: 'typebox'
schema
},
{ cwd }
)
Expand All @@ -129,7 +131,7 @@ describe('@feathersjs/generators', () => {
path: 'customized',
authentication: false,
type: 'custom',
schema: 'json'
schema
},
{ cwd }
)
Expand Down

0 comments on commit f49bfe2

Please sign in to comment.