mirror of
https://github.com/softprops/action-gh-release.git
synced 2025-05-13 03:34:20 +00:00
setup integration test
This commit is contained in:
parent
1a522d88d8
commit
845942e04a
555 changed files with 103819 additions and 1 deletions
25
node_modules/bottleneck/scripts/assemble_lua.js
generated
vendored
Normal file
25
node_modules/bottleneck/scripts/assemble_lua.js
generated
vendored
Normal file
|
@ -0,0 +1,25 @@
|
|||
var fs = require('fs')
|
||||
|
||||
var input = __dirname + '/../src/redis'
|
||||
var loaded = {}
|
||||
|
||||
var promises = fs.readdirSync(input).map(function (file) {
|
||||
return new Promise(function (resolve, reject) {
|
||||
fs.readFile(input + '/' + file, function (err, data) {
|
||||
if (err != null) {
|
||||
return reject(err)
|
||||
}
|
||||
loaded[file] = data.toString('utf8')
|
||||
return resolve()
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Promise.all(promises)
|
||||
.then(function () {
|
||||
console.log(JSON.stringify(loaded, Object.keys(loaded).sort(), 2))
|
||||
})
|
||||
.catch(function (err) {
|
||||
console.error(err)
|
||||
process.exit(1)
|
||||
})
|
82
node_modules/bottleneck/scripts/build.sh
generated
vendored
Executable file
82
node_modules/bottleneck/scripts/build.sh
generated
vendored
Executable file
|
@ -0,0 +1,82 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
if [ ! -d node_modules ]; then
|
||||
echo "[B] Run 'npm install' first"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
||||
clean() {
|
||||
rm -f .babelrc
|
||||
rm -rf lib/*
|
||||
node scripts/version.js > lib/version.json
|
||||
node scripts/assemble_lua.js > lib/lua.json
|
||||
}
|
||||
|
||||
makeLib10() {
|
||||
echo '[B] Compiling Bottleneck to Node 10+...'
|
||||
npx coffee --compile --bare --no-header src/*.coffee
|
||||
mv src/*.js lib/
|
||||
}
|
||||
|
||||
makeLib6() {
|
||||
echo '[B] Compiling Bottleneck to Node 6+...'
|
||||
ln -s .babelrc.lib .babelrc
|
||||
npx coffee --compile --bare --no-header --transpile src/*.coffee
|
||||
mv src/*.js lib/
|
||||
}
|
||||
|
||||
makeES5() {
|
||||
echo '[B] Compiling Bottleneck to ES5...'
|
||||
ln -s .babelrc.es5 .babelrc
|
||||
npx coffee --compile --bare --no-header src/*.coffee
|
||||
mv src/*.js lib/
|
||||
|
||||
echo '[B] Assembling ES5 bundle...'
|
||||
npx rollup -c rollup.config.es5.js
|
||||
}
|
||||
|
||||
makeLight() {
|
||||
makeLib10
|
||||
|
||||
echo '[B] Assembling light bundle...'
|
||||
npx rollup -c rollup.config.light.js
|
||||
}
|
||||
|
||||
makeTypings() {
|
||||
echo '[B] Compiling and testing TS typings...'
|
||||
npx ejs-cli bottleneck.d.ts.ejs > bottleneck.d.ts
|
||||
npx tsc --noEmit --strict test.ts
|
||||
}
|
||||
|
||||
if [ "$1" = 'dev' ]; then
|
||||
clean
|
||||
makeLib10
|
||||
elif [ "$1" = 'bench' ]; then
|
||||
clean
|
||||
makeLib6
|
||||
elif [ "$1" = 'es5' ]; then
|
||||
clean
|
||||
makeES5
|
||||
elif [ "$1" = 'light' ]; then
|
||||
clean
|
||||
makeLight
|
||||
elif [ "$1" = 'typings' ]; then
|
||||
makeTypings
|
||||
else
|
||||
clean
|
||||
makeES5
|
||||
|
||||
clean
|
||||
makeLight
|
||||
|
||||
clean
|
||||
makeLib6
|
||||
makeTypings
|
||||
fi
|
||||
|
||||
rm -f .babelrc
|
||||
|
||||
echo '[B] Done!'
|
20
node_modules/bottleneck/scripts/test_all.sh
generated
vendored
Executable file
20
node_modules/bottleneck/scripts/test_all.sh
generated
vendored
Executable file
|
@ -0,0 +1,20 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
set -e
|
||||
|
||||
source .env
|
||||
|
||||
echo 'ioredis tests'
|
||||
DATASTORE=ioredis npm test
|
||||
|
||||
echo 'NodeRedis tests'
|
||||
DATASTORE=redis npm test
|
||||
|
||||
echo 'ES5 bundle tests'
|
||||
BUILD=es5 npm test
|
||||
|
||||
echo 'Light bundle tests'
|
||||
BUILD=light npm test
|
||||
|
||||
echo 'Local tests'
|
||||
npm test
|
3
node_modules/bottleneck/scripts/version.js
generated
vendored
Normal file
3
node_modules/bottleneck/scripts/version.js
generated
vendored
Normal file
|
@ -0,0 +1,3 @@
|
|||
const packagejson = require('../package.json')
|
||||
|
||||
console.log(JSON.stringify({version: packagejson.version}))
|
Loading…
Add table
Add a link
Reference in a new issue