mirror of
https://github.com/actions/setup-node.git
synced 2025-04-22 09:21:00 +00:00
imporve e2e tests
This commit is contained in:
parent
17a4854193
commit
e9e4944550
2 changed files with 49 additions and 49 deletions
50
.github/workflows/e2e-cache.yml
vendored
50
.github/workflows/e2e-cache.yml
vendored
|
@ -146,55 +146,7 @@ jobs:
|
||||||
- uses: actions/checkout@v3
|
- uses: actions/checkout@v3
|
||||||
|
|
||||||
- name: prepare sub-projects
|
- name: prepare sub-projects
|
||||||
env:
|
run: __tests__/prepare-subprojects.sh
|
||||||
YARN_ENABLE_IMMUTABLE_INSTALLS: false
|
|
||||||
run: |
|
|
||||||
rm package.json
|
|
||||||
rm package-lock.json
|
|
||||||
echo "create yarn2 project in the sub2"
|
|
||||||
mkdir sub2
|
|
||||||
cd sub2
|
|
||||||
cat <<EOT >package.json
|
|
||||||
{
|
|
||||||
"name": "subproject",
|
|
||||||
"dependencies": {
|
|
||||||
"random": "^3.0.6",
|
|
||||||
"uuid": "^9.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOT
|
|
||||||
yarn set version 2.4.3
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
echo "create yarn3 project in the sub3"
|
|
||||||
cd ..
|
|
||||||
mkdir sub3
|
|
||||||
cd sub3
|
|
||||||
cat <<EOT >package.json
|
|
||||||
{
|
|
||||||
"name": "subproject",
|
|
||||||
"dependencies": {
|
|
||||||
"random": "^3.0.6",
|
|
||||||
"uuid": "^9.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOT
|
|
||||||
yarn set version 3.5.1
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
echo "create yarn1 project in the root"
|
|
||||||
cd ..
|
|
||||||
cat <<EOT >package.json
|
|
||||||
{
|
|
||||||
"name": "subproject",
|
|
||||||
"dependencies": {
|
|
||||||
"random": "^3.0.6",
|
|
||||||
"uuid": "^9.0.0"
|
|
||||||
}
|
|
||||||
}
|
|
||||||
EOT
|
|
||||||
yarn set version 1.22.19
|
|
||||||
yarn install
|
|
||||||
|
|
||||||
# expect
|
# expect
|
||||||
# - no errors
|
# - no errors
|
||||||
|
|
48
__tests__/prepare-subprojects.sh
Executable file
48
__tests__/prepare-subprojects.sh
Executable file
|
@ -0,0 +1,48 @@
|
||||||
|
#!/bin/sh -e
|
||||||
|
export YARN_ENABLE_IMMUTABLE_INSTALLS=false
|
||||||
|
rm package.json
|
||||||
|
rm package-lock.json
|
||||||
|
echo "create yarn2 project in the sub2"
|
||||||
|
mkdir sub2
|
||||||
|
cd sub2
|
||||||
|
cat <<EOT >package.json
|
||||||
|
{
|
||||||
|
"name": "subproject",
|
||||||
|
"dependencies": {
|
||||||
|
"random": "^3.0.6",
|
||||||
|
"uuid": "^9.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOT
|
||||||
|
yarn set version 2.4.3
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
echo "create yarn3 project in the sub3"
|
||||||
|
cd ..
|
||||||
|
mkdir sub3
|
||||||
|
cd sub3
|
||||||
|
cat <<EOT >package.json
|
||||||
|
{
|
||||||
|
"name": "subproject",
|
||||||
|
"dependencies": {
|
||||||
|
"random": "^3.0.6",
|
||||||
|
"uuid": "^9.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOT
|
||||||
|
yarn set version 3.5.1
|
||||||
|
yarn install
|
||||||
|
|
||||||
|
echo "create yarn1 project in the root"
|
||||||
|
cd ..
|
||||||
|
cat <<EOT >package.json
|
||||||
|
{
|
||||||
|
"name": "subproject",
|
||||||
|
"dependencies": {
|
||||||
|
"random": "^3.0.6",
|
||||||
|
"uuid": "^9.0.0"
|
||||||
|
}
|
||||||
|
}
|
||||||
|
EOT
|
||||||
|
yarn set version 1.22.19
|
||||||
|
yarn install
|
Loading…
Add table
Reference in a new issue