From 88ef05243aba62da6f8969393b13353f982213dc Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E2=80=9CJamesHenry=E2=80=9D?= Date: Fri, 1 Mar 2024 15:30:20 +0400 Subject: [PATCH] chore: streamline CI workflow --- .github/workflows/ci_main.yml | 17 +++-------------- nx.json | 3 --- package.json | 5 ++++- packages/rxjs/package.json | 25 ++++++++++++++++++++++++- 4 files changed, 31 insertions(+), 19 deletions(-) diff --git a/.github/workflows/ci_main.yml b/.github/workflows/ci_main.yml index 0bb556da4f..fb3985821b 100644 --- a/.github/workflows/ci_main.yml +++ b/.github/workflows/ci_main.yml @@ -25,21 +25,10 @@ jobs: node-version: ${{ matrix.node }} - name: Build, test and lint all projects (except website) - run: yarn nx run-many -t build lint test --exclude=rxjs.dev - - - name: rxjs lint - run: yarn workspace rxjs lint - - name: rxjs build - run: yarn workspace rxjs build - - name: rxjs test - run: yarn workspace rxjs test - - name: rxjs dtslint - run: yarn workspace rxjs dtslint - - name: rxjs test:import - run: yarn workspace rxjs test:import - - name: rxjs test:esm - run: yarn workspace rxjs test:esm + run: yarn nx run-many -t build lint test dtslint test:import test:esm --exclude=rxjs.dev + - name: rxjs.dev build run: yarn workspace rxjs.dev build --prod + - name: rxjs.dev test run: yarn workspace rxjs.dev test --watch=false --browsers=ChromeHeadless diff --git a/nx.json b/nx.json index 29ca0bccf0..84abd5afec 100644 --- a/nx.json +++ b/nx.json @@ -9,9 +9,6 @@ "inputs": ["production", "^production"], "cache": true }, - "test:circular": { - "dependsOn": ["build"] - }, "test": { "cache": true }, diff --git a/package.json b/package.json index aa9d433642..37322a50de 100644 --- a/package.json +++ b/package.json @@ -55,6 +55,9 @@ "prettier --write" ], "*.{js,css,md}": "prettier --write" + }, + "volta": { + "node": "20.11.1", + "yarn": "1.22.21" } } - diff --git a/packages/rxjs/package.json b/packages/rxjs/package.json index 90c26e6051..413a3d6390 100644 --- a/packages/rxjs/package.json +++ b/packages/rxjs/package.json @@ -60,7 +60,7 @@ }, "scripts": { "lint": "eslint --ext=ts,js src spec spec-dtslint", - "dtslint": "npm run lint && tsc -b ./src/tsconfig.types.json", + "dtslint": "tsc -b ./src/tsconfig.types.json", "test": "cross-env TS_NODE_PROJECT=tsconfig.mocha.json mocha --config spec/support/.mocharc.js \"spec/**/*-spec.ts\"", "test:esm": "node spec/module-test-spec.mjs", "test:circular": "dependency-cruiser --validate .dependency-cruiser.json -x \"^node_modules\" dist/esm", @@ -180,6 +180,29 @@ "dependsOn": [ "^build" ] + }, + "test:esm": { + "dependsOn": [ + "build" + ], + "cache": true + }, + "test:circular": { + "dependsOn": [ + "build" + ] + }, + "test:import": { + "dependsOn": [ + "build" + ], + "cache": true + }, + "dtslint": { + "dependsOn": [ + "^build" + ], + "cache": true } } }