Additional CI actions (#386)
This commit is contained in:
+2
-1
@@ -8,7 +8,8 @@ module.exports = {
|
||||
ignorePatterns: [
|
||||
...base.ignorePatterns,
|
||||
'**/target/*',
|
||||
'**/build-wasm/*'
|
||||
'**/build-wasm/*',
|
||||
'**/deno/*.ts'
|
||||
],
|
||||
parserOptions: {
|
||||
...base.parserOptions,
|
||||
|
||||
@@ -5,14 +5,18 @@ jobs:
|
||||
pr:
|
||||
strategy:
|
||||
matrix:
|
||||
step: ['lint', 'test', 'build']
|
||||
step: ['lint', 'test', 'build', 'deno']
|
||||
name: ${{ matrix.step }}
|
||||
runs-on: ubuntu-latest
|
||||
env:
|
||||
YARN_ENABLE_SCRIPTS: false
|
||||
steps:
|
||||
- uses: actions/checkout@v2
|
||||
- uses: denoland/setup-deno@v1
|
||||
with:
|
||||
deno-version: vx.x.x
|
||||
- name: ${{ matrix.step }}
|
||||
if: always()
|
||||
run: |
|
||||
yarn install --immutable | grep -v 'YN0013'
|
||||
./scripts/install-build-deps.sh
|
||||
|
||||
@@ -0,0 +1,11 @@
|
||||
// Copyright 2019-2022 @polkadot/wasm authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
// auto-generated via deno/setup.ts, do not edit
|
||||
|
||||
export * as wasmBridge from 'https://deno.land/x/polkadot/wasm-bridge/mod.ts';
|
||||
export * as wasmCrypto from 'https://deno.land/x/polkadot/wasm-crypto/mod.ts';
|
||||
export * as wasmCryptoAsmjs from 'https://deno.land/x/polkadot/wasm-crypto-asmjs/mod.ts';
|
||||
export * as wasmCryptoInit from 'https://deno.land/x/polkadot/wasm-crypto-init/mod.ts';
|
||||
export * as wasmCryptoWasm from 'https://deno.land/x/polkadot/wasm-crypto-wasm/mod.ts';
|
||||
export * as wasmUtil from 'https://deno.land/x/polkadot/wasm-util/mod.ts';
|
||||
@@ -0,0 +1,10 @@
|
||||
{
|
||||
"imports": {
|
||||
"https://deno.land/x/polkadot/wasm-crypto-init/": "../packages/wasm-crypto-init/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-bridge/": "../packages/wasm-bridge/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-crypto-wasm/": "../packages/wasm-crypto-wasm/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-crypto/": "../packages/wasm-crypto/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-crypto-asmjs/": "../packages/wasm-crypto-asmjs/build-deno/",
|
||||
"https://deno.land/x/polkadot/wasm-util/": "../packages/wasm-util/build-deno/"
|
||||
}
|
||||
}
|
||||
@@ -0,0 +1,27 @@
|
||||
// Copyright 2019-2022 @polkadot/wasm authors & contributors
|
||||
// SPDX-License-Identifier: Apache-2.0
|
||||
|
||||
/* eslint-disable sort-keys */
|
||||
|
||||
import { stringCamelCase } from 'https://deno.land/x/polkadot/util/mod.ts';
|
||||
|
||||
const exports: string[] = [];
|
||||
const imports: Record<string, string> = {};
|
||||
|
||||
for await (const entry of Deno.readDir('packages')) {
|
||||
if (entry.isDirectory) {
|
||||
try {
|
||||
await Deno.readTextFile(`packages/${entry.name}/src/mod.ts`);
|
||||
|
||||
exports.push(`export * as ${stringCamelCase(entry.name)} from 'https://deno.land/x/polkadot/${entry.name}/mod.ts';`);
|
||||
|
||||
imports[`https://deno.land/x/polkadot/${entry.name}/`] = `../packages/${entry.name}/build-deno/`;
|
||||
} catch {
|
||||
// ignore
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
await Deno.writeTextFile('deno/check.ts', `// Copyright 2019-${new Date().getFullYear()} @polkadot/wasm authors & contributors\n// SPDX-License-Identifier: Apache-2.0\n\n// auto-generated via deno/setup.ts, do not edit\n\n${exports.sort().join('\n')}\n`);
|
||||
|
||||
await Deno.writeTextFile('deno/import_map.json', `${JSON.stringify({ imports }, null, 2)}\n`);
|
||||
@@ -22,6 +22,9 @@
|
||||
"build:rollup": "polkadot-exec-rollup --config",
|
||||
"build:wasm": "./scripts/build.sh",
|
||||
"clean": "./scripts/clean.sh",
|
||||
"deno": "yarn build:js && yarn deno:setup && yarn deno:check",
|
||||
"deno:check": "deno check --import-map=deno/import_map.json deno/check.ts",
|
||||
"deno:setup": "deno run --import-map=deno/import_map.json --allow-read --allow-write deno/setup.ts",
|
||||
"lint": "polkadot-dev-run-lint",
|
||||
"postinstall": "polkadot-dev-yarn-only",
|
||||
"test": "yarn test:wasm-crypto:rust",
|
||||
|
||||
Reference in New Issue
Block a user