From 9344bcfea57ed2fdfa2817d0758d1ac16ec2a284 Mon Sep 17 00:00:00 2001 From: Santeri Hiltunen Date: Mon, 15 Jul 2024 16:28:50 +0300 Subject: [PATCH] Fix running create tests --- .github/workflows/ci.yml | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index a6efdc1..7afced1 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -24,8 +24,8 @@ jobs: name: Create strategy: matrix: - os: [ubuntu, windows, macos] - node-version: [18.x, 20.x, 22.x] + os: [ubuntu] + node-version: [22.x] package-manager: [npm, yarn, pnpm] runs-on: ${{ matrix.os }}-latest steps: @@ -39,18 +39,18 @@ jobs: uses: actions/setup-node@v3 with: node-version: ${{ matrix.node-version }} - cache: npm - - run: npm install --production - - run: npm install --global . + - 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 install --global . + 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