Add Appveyor test, update readme
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
All checks were successful
continuous-integration/appveyor/branch AppVeyor build succeeded
This commit is contained in:
parent
f9db881123
commit
c476ef7b18
4 changed files with 40 additions and 6 deletions
|
@ -1,4 +1,4 @@
|
||||||
# storage-upload
|
# storage-upload [![Build status](https://ci.nfp.is/api/projects/status/29k8rnhf5w8s0hn4/branch/master?svg=true)](https://ci.nfp.is/project/AppVeyor/storage-upload/branch/master)
|
||||||
|
|
||||||
Micro service for uploading and image resizing files to a storage server.
|
Micro service for uploading and image resizing files to a storage server.
|
||||||
|
|
||||||
|
|
15
appveyor.yml
15
appveyor.yml
|
@ -12,14 +12,21 @@ skip_tags: true
|
||||||
|
|
||||||
# Maximum number of concurrent jobs for the project
|
# Maximum number of concurrent jobs for the project
|
||||||
max_jobs: 1
|
max_jobs: 1
|
||||||
|
clone_depth: 1
|
||||||
|
|
||||||
# Build worker image (VM template)
|
# Build worker image (VM template)
|
||||||
build_cloud: Docker
|
build_cloud: Docker
|
||||||
image: node
|
|
||||||
|
environment:
|
||||||
|
docker_image: node:16-alpine
|
||||||
|
npm_config_cache: /appveyor/projects/cache
|
||||||
|
|
||||||
build_script:
|
build_script:
|
||||||
- sh: npm install
|
- sh: |
|
||||||
- sh: npm list --all
|
chown -R node:node /appveyor/projects
|
||||||
|
npm install
|
||||||
|
npm list --all
|
||||||
|
|
||||||
test_script:
|
test_script:
|
||||||
- sh: npm test
|
- sh: |
|
||||||
|
npm run test:linux
|
|
@ -24,7 +24,7 @@
|
||||||
"flaska": "^0.9.8",
|
"flaska": "^0.9.8",
|
||||||
"formidable": "^1.2.2",
|
"formidable": "^1.2.2",
|
||||||
"nconf-lite": "^2.0.0",
|
"nconf-lite": "^2.0.0",
|
||||||
"sharp-lite": "^1.29.5"
|
"sharp-lite": "^1.29.6"
|
||||||
},
|
},
|
||||||
"devDependencies": {
|
"devDependencies": {
|
||||||
"eltro": "^1.2.3"
|
"eltro": "^1.2.3"
|
||||||
|
|
27
test.js
Normal file
27
test.js
Normal file
|
@ -0,0 +1,27 @@
|
||||||
|
const fs = require('fs');
|
||||||
|
const os = require('os');
|
||||||
|
const path = require('path');
|
||||||
|
|
||||||
|
const env = process.env;
|
||||||
|
|
||||||
|
const mkdirSync = function (dirPath) {
|
||||||
|
try {
|
||||||
|
fs.mkdirSync(dirPath, { recursive: true });
|
||||||
|
} catch (err) {
|
||||||
|
/* istanbul ignore next */
|
||||||
|
if (err.code !== 'EEXIST') {
|
||||||
|
throw err;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
|
const cachePath = function () {
|
||||||
|
const npmCachePath = env.npm_config_cache || /* istanbul ignore next */
|
||||||
|
(env.APPDATA ? path.join(env.APPDATA, 'npm-cache') : path.join(os.homedir(), '.npm'));
|
||||||
|
mkdirSync(npmCachePath);
|
||||||
|
const libvipsCachePath = path.join(npmCachePath, '_libvips');
|
||||||
|
mkdirSync(libvipsCachePath);
|
||||||
|
return libvipsCachePath;
|
||||||
|
};
|
||||||
|
|
||||||
|
cachePath()
|
Loading…
Reference in a new issue