Skip to content

Commit

Permalink
build: update -browser to -client everywhere
Browse files Browse the repository at this point in the history
  • Loading branch information
Xunnamius committed Jan 12, 2021
1 parent 5ebb2c4 commit 597d6c5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 19 deletions.
22 changes: 11 additions & 11 deletions .github/workflows/build-test-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,8 +58,8 @@ jobs:
${{ steps.data.outputs.has-integration-node == 'true' }}
has-integration-externals:
${{ steps.data.outputs.has-integration-externals == 'true' }}
has-integration-browser:
${{ steps.data.outputs.has-integration-browser == 'true' }}
has-integration-client:
${{ steps.data.outputs.has-integration-client == 'true' }}
has-integration-webpack:
${{ steps.data.outputs.has-integration-webpack == 'true' }}
steps:
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
if [ $? -eq 0 ]; then HAS_NODE=true; else HAS_NODE=false; fi
echo $NPMR | grep -qe '\stest-integration-externals\s'
if [ $? -eq 0 ]; then HAS_IEXT=true; else HAS_IEXT=false; fi
echo $NPMR | grep -qe '\stest-integration-browser\s'
echo $NPMR | grep -qe '\stest-integration-client\s'
if [ $? -eq 0 ]; then HAS_BWSR=true; else HAS_BWSR=false; fi
echo $NPMR | grep -qe '\stest-integration-webpack\s'
if [ $? -eq 0 ]; then HAS_WEBP=true; else HAS_WEBP=false; fi
Expand All @@ -169,7 +169,7 @@ jobs:
echo "::set-output name=has-externals::$HAS_EXTS"
echo "::set-output name=has-integration-node::$HAS_NODE"
echo "::set-output name=has-integration-externals::$HAS_IEXT"
echo "::set-output name=has-integration-browser::$HAS_BWSR"
echo "::set-output name=has-integration-client::$HAS_BWSR"
echo "::set-output name=has-integration-webpack::$HAS_WEBP"
echo "::set-output name=has-deploy::$HAS_DPLY"
Expand All @@ -178,7 +178,7 @@ jobs:
! [ -z "$DEBUG" ] && echo "set-output name=has-externals::$HAS_EXTS" || true
! [ -z "$DEBUG" ] && echo "set-output name=has-integration-node::$HAS_NODE" || true
! [ -z "$DEBUG" ] && echo "set-output name=has-integration-externals::$HAS_IEXT" || true
! [ -z "$DEBUG" ] && echo "set-output name=has-integration-browser::$HAS_BWSR" || true
! [ -z "$DEBUG" ] && echo "set-output name=has-integration-client::$HAS_BWSR" || true
! [ -z "$DEBUG" ] && echo "set-output name=has-integration-webpack::$HAS_WEBP" || true
! [ -z "$DEBUG" ] && echo "set-output name=has-deploy::$HAS_DPLY" || true
Expand Down Expand Up @@ -404,13 +404,13 @@ jobs:
MATRIX_NODE_VERSION: ${{ matrix.node }}
run: npm run test-integration-externals

test-integration-browser:
name: '[CI] test-integration-browser'
test-integration-client:
name: '[CI] test-integration-client'
runs-on: ubuntu-latest
needs: metadata
if: |
needs.metadata.outputs.should-skip-ci != 'true'
&& needs.metadata.outputs.has-integration-browser == 'true'
&& needs.metadata.outputs.has-integration-client == 'true'
steps:
- name: Checkout
uses: actions/checkout@v2
Expand Down Expand Up @@ -446,7 +446,7 @@ jobs:
run: npm run build-dist

- name: Test integration
run: npm run test-integration-browser
run: npm run test-integration-client

test-integration-webpack:
name: '[CI] test-integration-webpack'
Expand Down Expand Up @@ -579,7 +579,7 @@ jobs:
- metadata
- test-integration-node
- test-integration-externals
- test-integration-browser
- test-integration-client
- test-integration-webpack
if: |
always()
Expand All @@ -589,7 +589,7 @@ jobs:
&& needs.test-unit.result == 'success'
&& (needs.metadata.outputs.has-integration-node != 'true' || needs.test-integration-node.result == 'success')
&& (needs.metadata.outputs.has-integration-externals != 'true' || needs.test-integration-externals.result == 'success')
&& (needs.metadata.outputs.has-integration-browser != 'true' || needs.test-integration-browser.result == 'success')
&& (needs.metadata.outputs.has-integration-client != 'true' || needs.test-integration-client.result == 'success')
&& (needs.metadata.outputs.has-integration-webpack != 'true' || needs.test-integration-webpack.result == 'success')
steps:
- name: Checkout
Expand Down
13 changes: 7 additions & 6 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -262,10 +262,11 @@ Jobs in the same column are executed concurrently. A job failing in one column
prevents the pipeline from proceeding to the next column.

This pipeline supports four suites of integration tests: _node_, _externals_,
_browser_, and _webpack_. The presence of these test suites is picked up by
`grep`-ing the output of `npm run list-tasks` to search for the presence of the
script keys `test-integration-node`, `test-integration-externals`,
`test-integration-browser`, or `test-integration-webpack` respectively.
_client_ (for browsers/cli/etc), and _webpack_. The presence of these test
suites is picked up by `grep`-ing the output of `npm run list-tasks` to search
for the presence of the script keys `test-integration-node`,
`test-integration-externals`, `test-integration-client`, or
`test-integration-webpack` respectively.

This pipeline also supports an optional documentation build step via the
`build-docs` key. A warning will be generated for projects that lack this key.
Expand Down Expand Up @@ -313,8 +314,8 @@ which of the following scripts are available for this project.
- Can also run `npm run test-integration` to run all the integration tests
- `npm run test-integration-node` to run integration tests on the last three LTS
Node versions (handled by CI)
- `npm run test-integration-browser` to run browser integration tests with
[puppeteer][52] (handled by CI)
- `npm run test-integration-client` to run client (browser/cli/etc) integration
tests with [puppeteer][52] (handled by CI)
- `npm run test-integration-webpack` to run tests verifying the distributable
can be bundled with Webpack 4 and 5 (as ESM, CJS, or both) (handled by CI)
- `npm run test-integration-externals` to run tests on compiled external
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@
"prepare": "if [ -z \"$CI\" ]; then npx husky install; else echo 'skipped installing husky git hooks'; fi",
"test": "npm run test-unit --",
"test-integration": "npm run list-tasks | grep -e '^test-integration-' | xargs -n1 npm run",
"test-integration-browser": "BABEL_ENV=test jest test/integration-browser*.test.ts",
"test-integration-client": "BABEL_ENV=test jest test/integration-client*.test.ts",
"test-integration-node": "BABEL_ENV=test jest test/integration-node*.test.ts",
"test-unit": "if ! [ -z \"$INCLUDE_EXTERNALS\" ]; then X=; Y='--collectCoverageFrom'; Z='external-scripts/**/*.ts'; else X='test/unit-external*.test.ts'; Y=; Z=; fi; BABEL_ENV=test jest --coverage --collectCoverageFrom 'src/**/*.ts' --collectCoverageFrom 'lib/**/*.ts' $Y $Z --testPathIgnorePatterns test/integration-*.test.ts $X"
},
Expand Down
2 changes: 1 addition & 1 deletion test/integration-browser.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@
import { main } from '../package.json';
import { unitServerPuppeteer } from './setup';

describe('workflow-playground [INTEGRATION-BROWSER]', () => {
describe('workflow-playground [INTEGRATION-CLIENT]', () => {
it('should export expected members', async () => {
expect.hasAssertions();

Expand Down

0 comments on commit 597d6c5

Please sign in to comment.