Merge pull request #520 from 0xProject/fix/installation-tests
Fix the publishing/installation test issues
This commit is contained in:
@@ -183,9 +183,9 @@ workflows:
|
|||||||
main:
|
main:
|
||||||
jobs:
|
jobs:
|
||||||
- build
|
- build
|
||||||
# - test-installation:
|
- test-installation:
|
||||||
# requires:
|
requires:
|
||||||
# - build
|
- build
|
||||||
- test-0xjs:
|
- test-0xjs:
|
||||||
requires:
|
requires:
|
||||||
- build
|
- build
|
||||||
|
|||||||
@@ -52,7 +52,6 @@
|
|||||||
"@0xproject/tslint-config": "^0.4.15",
|
"@0xproject/tslint-config": "^0.4.15",
|
||||||
"@types/require-from-string": "^1.2.0",
|
"@types/require-from-string": "^1.2.0",
|
||||||
"@types/semver": "^5.5.0",
|
"@types/semver": "^5.5.0",
|
||||||
"@types/yargs": "^11.0.0",
|
|
||||||
"chai": "^4.0.1",
|
"chai": "^4.0.1",
|
||||||
"chai-as-promised": "^7.1.0",
|
"chai-as-promised": "^7.1.0",
|
||||||
"copyfiles": "^1.2.0",
|
"copyfiles": "^1.2.0",
|
||||||
@@ -73,6 +72,7 @@
|
|||||||
"@0xproject/typescript-typings": "^0.1.0",
|
"@0xproject/typescript-typings": "^0.1.0",
|
||||||
"@0xproject/utils": "^0.5.1",
|
"@0xproject/utils": "^0.5.1",
|
||||||
"@0xproject/web3-wrapper": "^0.6.0",
|
"@0xproject/web3-wrapper": "^0.6.0",
|
||||||
|
"@types/yargs": "^11.0.0",
|
||||||
"ethereumjs-util": "^5.1.1",
|
"ethereumjs-util": "^5.1.1",
|
||||||
"isomorphic-fetch": "^2.2.1",
|
"isomorphic-fetch": "^2.2.1",
|
||||||
"lodash": "^4.17.4",
|
"lodash": "^4.17.4",
|
||||||
|
|||||||
@@ -43,6 +43,7 @@
|
|||||||
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
|
"homepage": "https://github.com/0xProject/0x-monorepo/packages/json-schemas/README.md",
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
"@0xproject/typescript-typings": "^0.1.0",
|
"@0xproject/typescript-typings": "^0.1.0",
|
||||||
|
"@types/node": "^8.0.53",
|
||||||
"jsonschema": "^1.2.0",
|
"jsonschema": "^1.2.0",
|
||||||
"lodash.values": "^4.3.0"
|
"lodash.values": "^4.3.0"
|
||||||
},
|
},
|
||||||
|
|||||||
@@ -31,7 +31,7 @@ import { utils } from './utils';
|
|||||||
utils.log(`Installing ${packedPackageFileName}`);
|
utils.log(`Installing ${packedPackageFileName}`);
|
||||||
result = await execAsync(`yarn add ${packagePath}/${packedPackageFileName}`, { cwd: testDirectory });
|
result = await execAsync(`yarn add ${packagePath}/${packedPackageFileName}`, { cwd: testDirectory });
|
||||||
const indexFilePath = path.join(testDirectory, 'index.ts');
|
const indexFilePath = path.join(testDirectory, 'index.ts');
|
||||||
fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}'`);
|
fs.writeFileSync(indexFilePath, `import * as Package from '${packageName}';\n`);
|
||||||
const tsConfig = {
|
const tsConfig = {
|
||||||
compilerOptions: {
|
compilerOptions: {
|
||||||
typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'],
|
typeRoots: ['node_modules/@0xproject/typescript-typings/types', 'node_modules/@types'],
|
||||||
@@ -48,11 +48,13 @@ import { utils } from './utils';
|
|||||||
const tsconfigFilePath = path.join(testDirectory, 'tsconfig.json');
|
const tsconfigFilePath = path.join(testDirectory, 'tsconfig.json');
|
||||||
fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsConfig, null, 4));
|
fs.writeFileSync(tsconfigFilePath, JSON.stringify(tsConfig, null, 4));
|
||||||
utils.log(`Compiling ${packageName}`);
|
utils.log(`Compiling ${packageName}`);
|
||||||
await execAsync('../node_modules/typescript/bin/tsc', { cwd: testDirectory });
|
const tscBinaryPath = path.join(monorepoRootPath, './node_modules/typescript/bin/tsc');
|
||||||
|
await execAsync(tscBinaryPath, { cwd: testDirectory });
|
||||||
utils.log(`Successfully compiled with ${packageName} as a dependency`);
|
utils.log(`Successfully compiled with ${packageName} as a dependency`);
|
||||||
rimraf.sync(testDirectory);
|
rimraf.sync(testDirectory);
|
||||||
}
|
}
|
||||||
})().catch(err => {
|
})().catch(err => {
|
||||||
|
utils.log(err.stderr);
|
||||||
utils.log(err.stdout);
|
utils.log(err.stdout);
|
||||||
process.exit(1);
|
process.exit(1);
|
||||||
});
|
});
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig",
|
"extends": "../../tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"typeRoots": ["node_modules/@types"],
|
"typeRoots": ["../../node_modules/@types", "node_modules/@types"],
|
||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"include": ["./src/**/*"]
|
"include": ["./src/**/*"]
|
||||||
|
|||||||
@@ -2,13 +2,13 @@
|
|||||||
"name": "@0xproject/sra-report",
|
"name": "@0xproject/sra-report",
|
||||||
"version": "0.0.8",
|
"version": "0.0.8",
|
||||||
"description": "Generate reports for standard relayer API compliance",
|
"description": "Generate reports for standard relayer API compliance",
|
||||||
"main": "lib/index.js",
|
"main": "lib/src/index.js",
|
||||||
"types": "lib/index.d.ts",
|
"types": "lib/src/index.d.ts",
|
||||||
"scripts": {
|
"scripts": {
|
||||||
"build:watch": "tsc -w",
|
"build:watch": "tsc -w",
|
||||||
"clean": "shx rm -rf lib scripts",
|
"clean": "shx rm -rf lib scripts",
|
||||||
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
"build": "tsc && copyfiles -u 3 './lib/src/monorepo_scripts/**/*' ./scripts",
|
||||||
"lint": "tslint --project . 'src/**/*.ts' 'test/**/*.ts'",
|
"lint": "tslint --project .",
|
||||||
"test": "run-s clean build copy_test_environments copy_test_fixtures run_mocha",
|
"test": "run-s clean build copy_test_environments copy_test_fixtures run_mocha",
|
||||||
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
|
"copy_test_fixtures": "copyfiles -u 2 './test/fixtures/**/*.json' ./lib/test/fixtures",
|
||||||
"copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments",
|
"copy_test_environments": "copyfiles -u 2 './test/environments/**/*.json' ./lib/test/environments",
|
||||||
@@ -16,7 +16,7 @@
|
|||||||
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
|
"manual:postpublish": "yarn build; node ./scripts/postpublish.js"
|
||||||
},
|
},
|
||||||
"bin": {
|
"bin": {
|
||||||
"sra-report": "lib/index.js"
|
"sra-report": "lib/src/index.js"
|
||||||
},
|
},
|
||||||
"repository": {
|
"repository": {
|
||||||
"type": "git",
|
"type": "git",
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig",
|
"extends": "../../tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"typeRoots": ["node_modules/@types"],
|
"typeRoots": ["../../node_modules/@types", "node_modules/@types"],
|
||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"include": ["./rules/**/*", "./monorepo_scripts/**/*"]
|
"include": ["./rules/**/*", "./monorepo_scripts/**/*"]
|
||||||
|
|||||||
@@ -1,7 +1,7 @@
|
|||||||
{
|
{
|
||||||
"extends": "../../tsconfig",
|
"extends": "../../tsconfig",
|
||||||
"compilerOptions": {
|
"compilerOptions": {
|
||||||
"typeRoots": ["node_modules/@types"],
|
"typeRoots": ["../../node_modules/@types", "node_modules/@types"],
|
||||||
"outDir": "lib"
|
"outDir": "lib"
|
||||||
},
|
},
|
||||||
"include": ["src/**/*"]
|
"include": ["src/**/*"]
|
||||||
|
|||||||
@@ -1,5 +1,4 @@
|
|||||||
declare module 'ethereumjs-util' {
|
declare module 'ethereumjs-util' {
|
||||||
import { Buffer } from 'buffer';
|
|
||||||
import BN = require('bn.js');
|
import BN = require('bn.js');
|
||||||
|
|
||||||
interface Signature {
|
interface Signature {
|
||||||
|
|||||||
Reference in New Issue
Block a user