From 8ab1de79ce2e84bc31d477da426a5a27c970fc12 Mon Sep 17 00:00:00 2001 From: Aria Minaei Date: Mon, 6 Feb 2023 12:58:13 +0100 Subject: [PATCH] Make a shortcut for installing compat-tests' fixtures --- .github/workflows/ci.yml | 2 +- compatibility-tests/README.md | 2 +- package.json | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 2871c79..8fa0155 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -116,4 +116,4 @@ jobs: yarn workspace @theatre/compatibility-tests run install-fixtures --verbose # after that, we run the jest tests for each fixture - - run: yarn test:compat + - run: yarn test:compat:run diff --git a/compatibility-tests/README.md b/compatibility-tests/README.md index 1e90145..143e11e 100644 --- a/compatibility-tests/README.md +++ b/compatibility-tests/README.md @@ -14,7 +14,7 @@ This setup helps us test whether Theatre.js is compatible with popular tools in 1. First, we run `yarn run install-fixtures`, which tries to install Theatre.js on a fixture as if `@theatre/core|studio|r3f` were installed through npm. This script runs a [local npm registry](https://github.com/verdaccio/verdaccio) and publishes a production build of all the Theatre.js packages to it. Then, it iterates through `./fixtures/*/package` and runs `$ npm install` on them, using that local npm registry. **If this step fails**, that usually means one of `@theatre/*` packages has a `dependency/peerDependency` that cannot be satisfied by `npm/yarn`. So this is always the first thing to fix. -1. Then, we run `$ yarn test:compat`, which will run jest on all of `*.compat-test.ts` files, each of which tests an aspect of a test setup. +1. Then, we run `$ yarn test:compat:run`, which will run jest on all of `*.compat-test.ts` files, each of which tests an aspect of a test setup. 2. Most of our fixtures don't actually have `.compat-test.ts` files, so we'll have to run them manually and see if Theatre still works in them, jut like a manual QA pass. > **Gotchas** diff --git a/package.json b/package.json index 15daf4f..505a649 100644 --- a/package.json +++ b/package.json @@ -18,7 +18,8 @@ "clean": "zx scripts/clean.mjs", "build:ts": "tsc --build ./devEnv/typecheck-all-projects/tsconfig.all.json", "test": "jest", - "test:compat": "jest --config jest.compat-tests.config.js", + "test:compat:install": "yarn workspace @theatre/compatibility-tests run install-fixtures", + "test:compat:run": "jest --config jest.compat-tests.config.js", "postinstall": "husky install", "release": "zx scripts/release.mjs", "lint:all": "eslint . --ext ts,tsx --ignore-path=.gitignore --rulesdir ./devEnv/eslint/rules"