diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6efdc1..db11738 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -39,18 +39,19 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: npm - - run: npm install --production - - run: npm install --global . + cache: ${{ matrix.package-manager }} + - run: ${{ matrix.package-manager }} install + env: + NODE_ENV: production - - name: Create empty package.json for pnpm - run: | - with open("package.json", "w") as f: - f.write('{}') - shell: python - working-directory: ${{ runner.temp }} + - run: npm link . + if: matrix.package-manager == 'npm' + - run: yarn link + if: matrix.package-manager == 'yarn' + - run: pnpm link --global if: matrix.package-manager == 'pnpm' - - run: ${{ matrix.package-manager }} exec create-ts-node new-project + + - run: ${{ matrix.package-manager }} create ts-node new-project working-directory: ${{ runner.temp }} - run: ${{ matrix.package-manager }} install working-directory: ${{ runner.temp }}/new-project