Skip to content

Commit

Permalink
get the OL version from package.json
Browse files Browse the repository at this point in the history
  • Loading branch information
mmomtchev committed Jan 9, 2025
1 parent 3358557 commit f7c3fc7
Showing 1 changed file with 14 additions and 13 deletions.
27 changes: 14 additions & 13 deletions .github/workflows/test-npm.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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:
Expand All @@ -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

0 comments on commit f7c3fc7

Please sign in to comment.