From f7c3fc7aab73bac7e3cd841db5c10c71337a1085 Mon Sep 17 00:00:00 2001 From: Momtchil Momtchev Date: Thu, 9 Jan 2025 16:10:14 +0100 Subject: [PATCH] get the OL version from package.json --- .github/workflows/test-npm.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.github/workflows/test-npm.yml b/.github/workflows/test-npm.yml index db2e870..34fab77 100644 --- a/.github/workflows/test-npm.yml +++ b/.github/workflows/test-npm.yml @@ -25,14 +25,15 @@ jobs: run: | curl https://codeload.github.com/mmomtchev/rlayers/zip/refs/tags/v${{ github.event.inputs.rlayers }} --output repo.zip unzip repo.zip - mv rlayers-${{ github.event.inputs.rlayers }}/package*.json . + mv rlayers-${{ github.event.inputs.rlayers }}/package.json . mv rlayers-${{ github.event.inputs.rlayers }}/tsconfig*.json . mv rlayers-${{ github.event.inputs.rlayers }}/jest.standalone.config.js jest.config.js curl https://raw.githubusercontent.com/mmomtchev/rlayers/main/jest.standalone.config.js --output jest.config.js mv rlayers-${{ github.event.inputs.rlayers }}/examples . mv rlayers-${{ github.event.inputs.rlayers }}/test . - name: Install from npm - run: npm install rlayers@${{ github.event.inputs.rlayers }} + run: npm install rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` + shell: bash - name: Run the unit tests run: | rm package.json @@ -49,7 +50,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-js npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build cra_react18_ts: @@ -61,7 +62,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-ts npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build cra_react18_1_js: @@ -73,7 +74,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-1-js npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build cra_react18_1_ts: @@ -85,7 +86,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-1-ts npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build cra_react18_2_js: @@ -97,7 +98,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-2-js npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build cra_react18_2_ts: @@ -109,7 +110,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-2-ts npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build cra_react18_3_ts: @@ -121,7 +122,7 @@ jobs: run: | cd rlayers-npm-tests/cra-react18-3-ts npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build nextjs12: @@ -137,7 +138,7 @@ jobs: run: | cd rlayers-npm-tests/next12 npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build nextjs13: @@ -149,7 +150,7 @@ jobs: run: | cd rlayers-npm-tests/next13 npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build nextjs13-esm: @@ -161,7 +162,7 @@ jobs: run: | cd rlayers-npm-tests/next13-esm npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build nextjs14-esm: @@ -173,5 +174,5 @@ jobs: run: | cd rlayers-npm-tests/next14-esm npm install - npm i rlayers@${{ github.event.inputs.rlayers }} + npm i rlayers@${{ github.event.inputs.rlayers }} ol@`node -p 'require("./package.json").peerDependencies.ol'` npm run build