Skip to content

Commit db5339b

Browse files
committed
parametrised tests
1 parent 91456e4 commit db5339b

File tree

3 files changed

+12
-6
lines changed

3 files changed

+12
-6
lines changed

.github/workflows/build-lint-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,7 +27,7 @@ jobs:
2727
secrets: inherit
2828
with:
2929
artifact-path: pages/lib/static-default
30-
artifact-name: dev-pages-${{ matrix.react }}
30+
artifact-name: dev-pages-react${{ matrix.react }}
3131
react-version: ${{ matrix.react }}
3232
deploy:
3333
needs: build
@@ -37,5 +37,5 @@ jobs:
3737
uses: cloudscape-design/actions/.github/workflows/deploy.yml@main
3838
secrets: inherit
3939
with:
40-
artifact-name: dev-pages-${{ matrix.react }}
40+
artifact-name: dev-pages-react${{ matrix.react }}
4141
deployment-path: pages/lib/static-default

build-tools/tasks/integ.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -8,14 +8,14 @@ const { parseArgs } = require('node:util');
88

99
module.exports = task('test:integ', async () => {
1010
const options = {
11-
shard: {
12-
type: 'string',
13-
},
11+
shard: { type: 'string' },
12+
reactVersion: { type: 'string' },
1413
};
15-
const shard = parseArgs({ options, strict: false }).values.shard;
14+
const { shard, reactVersion = '16' } = parseArgs({ options, strict: false }).values;
1615
const devServer = execa('webpack', ['serve', '--config', 'pages/webpack.config.integ.cjs'], {
1716
env: {
1817
NODE_ENV: 'development',
18+
REACT_VERSION: reactVersion,
1919
},
2020
});
2121
await waitOn({ resources: ['http://localhost:8080'] });

build-tools/tasks/motion.js

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,17 @@ const execa = require('execa');
44
const glob = require('glob');
55
const waitOn = require('wait-on');
66
const { task } = require('../utils/gulp-utils.js');
7+
const { parseArgs } = require('node:util');
78

89
module.exports = task('test:motion', async () => {
10+
const options = {
11+
reactVersion: { type: 'string' },
12+
};
13+
const { reactVersion = '16' } = parseArgs({ options, strict: false }).values;
914
const devServer = execa('webpack', ['serve', '--config', 'pages/webpack.config.integ.cjs'], {
1015
env: {
1116
NODE_ENV: 'development',
17+
REACT_VERSION: reactVersion,
1218
},
1319
});
1420
await waitOn({ resources: ['http://localhost:8080'] });

0 commit comments

Comments
 (0)