Skip to content

Commit

Permalink
Chore(test): Isolate a tsc run
Browse files Browse the repository at this point in the history
  • Loading branch information
SBoudrias committed Oct 4, 2024
1 parent 109d0da commit 69fba02
Show file tree
Hide file tree
Showing 4 changed files with 21 additions and 16 deletions.
26 changes: 18 additions & 8 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -109,6 +109,8 @@ jobs:
name: End to End build tests
runs-on: ubuntu-latest
needs: Compile
env:
YARN_ENABLE_IMMUTABLE_INSTALLS: false
steps:
- uses: actions/checkout@v4
- name: Cache turbo build setup
Expand All @@ -124,19 +126,27 @@ jobs:
cache: 'yarn'
- run: yarn install --immutable --immutable-cache
- run: yarn tsc
- name: Link packages to test
run: yarn workspaces foreach --all run link
- name: Extract demos to an isolated folder
- run: yarn workspaces focus --all --production
- name: Pack the monorepo modules
run: |
mkdir -p /tmp/artifacts
yarn workspace @inquirer/core pack --out /tmp/artifacts/inquirer-core.tgz
yarn workspace @inquirer/prompts pack --out /tmp/artifacts/inquirer-prompts.tgz
yarn workspace @inquirer/figures pack --out /tmp/artifacts/inquirer-figures.tgz
yarn workspace @repo/tsconfig pack --out /tmp/artifacts/tsconfig.tgz
- name: Extract @inquirer/demo to an isolated project & build
run: |
cur_dir=$(pwd)
temp_dir=$(mktemp -d)
cp -r packages/demo "$temp_dir"
cp -r packages/demo $temp_dir
cp .yarnrc.yml $temp_dir/demo
cd $temp_dir/demo
yarn add --dev @repo/tsconfig@file:/tmp/artifacts/tsconfig.tgz
yarn add @inquirer/core@file:/tmp/artifacts/inquirer-core.tgz
yarn add @inquirer/prompts@file:/tmp/artifacts/inquirer-prompts.tgz
yarn add @inquirer/figures@file:/tmp/artifacts/inquirer-figures.tgz
yarn install
yarn link -p "$cur_dir/packages/prompts"
yarn link -p "$cur_dir/packages/core"
yarn link -p "$cur_dir/packages/figures"
- run: yarn run tsc
yarn tsc
Package:
name: Are the types wrong?
Expand Down
2 changes: 1 addition & 1 deletion packages/demo/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -76,7 +76,7 @@
"yoctocolors-cjs": "^2.1.2"
},
"devDependencies": {
"@sindresorhus/tsconfig": "^6.0.0",
"@repo/tsconfig": "workspace:*",
"tshy": "^3.0.2"
},
"engines": {
Expand Down
7 changes: 1 addition & 6 deletions packages/demo/tsconfig.json
Original file line number Diff line number Diff line change
@@ -1,8 +1,3 @@
{
"extends": "@sindresorhus/tsconfig",
"compilerOptions": {
"lib": ["es2023"],
"skipLibCheck": false,
"esModuleInterop": true
}
"extends": "@repo/tsconfig"
}
2 changes: 1 addition & 1 deletion yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -498,7 +498,7 @@ __metadata:
"@inquirer/core": "npm:^9.2.1"
"@inquirer/figures": "npm:^1.0.6"
"@inquirer/prompts": "npm:^6.0.1"
"@sindresorhus/tsconfig": "npm:^6.0.0"
"@repo/tsconfig": "workspace:*"
tshy: "npm:^3.0.2"
yoctocolors-cjs: "npm:^2.1.2"
bin:
Expand Down

0 comments on commit 69fba02

Please sign in to comment.