Skip to content

Commit

Permalink
Try this
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra committed Dec 19, 2024
1 parent d57a12c commit 7798681
Showing 1 changed file with 23 additions and 7 deletions.
30 changes: 23 additions & 7 deletions .github/workflows/minimum-version-ts-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,15 +15,31 @@ jobs:
node-version: [ 16, 18, 20 ]
typescript-version: [ '4.7.3', '5.5.4' ]
steps:
- uses: actions/checkout@v4
- uses: pnpm/action-setup@v4
- name: Checkout repository
uses: actions/checkout@v4

- name: Setup pnpm
uses: pnpm/action-setup@v4
with:
version: 8.x.x
- uses: actions/setup-node@v4

- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
#Override TypeScript version
- run: pnpm install typescript@${{ matrix.typescript-version }}
- run: pnpm tsc -b

- name: Install dependencies
run: pnpm install

- name: Override TypeScript version
run: pnpm add typescript@${{ matrix.typescript-version }} --save-dev

- name: Build project
run: pnpm run build

- name: Test TypeScript Import
run: |
rm test.ts || true
echo "import { posthog } from './dist/module'; console.log(posthog);" > test.ts
pnpm exec tsc test.ts --strict --target es2017 --module commonjs --moduleResolution node --noEmit --skipLibCheck

0 comments on commit 7798681

Please sign in to comment.