Additional CI actions (#1580)

This commit is contained in:
Jaco
2022-07-06 00:19:30 +03:00
committed by GitHub
parent b96cfd36cf
commit 2d4995b16e
6 changed files with 72 additions and 2 deletions
+2 -1
View File
@@ -6,7 +6,8 @@ const base = require('@polkadot/dev/config/eslint.cjs');
module.exports = {
...base,
ignorePatterns: [
...base.ignorePatterns
...base.ignorePatterns,
'**/deno/*.ts'
],
parserOptions: {
...base.parserOptions,
+5 -1
View File
@@ -5,7 +5,7 @@ jobs:
pr:
strategy:
matrix:
step: ['lint', 'test', 'build']
step: ['lint', 'test', 'build', 'deno']
name: ${{ matrix.step }}
runs-on: ubuntu-latest
env:
@@ -13,7 +13,11 @@ jobs:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
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'
yarn ${{ matrix.step }}
+18
View File
@@ -0,0 +1,18 @@
// Copyright 2019-2022 @polkadot/util authors & contributors
// SPDX-License-Identifier: Apache-2.0
// auto-generated via deno/setup.ts, do not edit
export * as hwLedger from 'https://deno.land/x/polkadot/hw-ledger/mod.ts';
export * as hwLedgerTransports from 'https://deno.land/x/polkadot/hw-ledger-transports/mod.ts';
export * as keyring from 'https://deno.land/x/polkadot/keyring/mod.ts';
export * as networks from 'https://deno.land/x/polkadot/networks/mod.ts';
export * as util from 'https://deno.land/x/polkadot/util/mod.ts';
export * as utilCrypto from 'https://deno.land/x/polkadot/util-crypto/mod.ts';
export * as xBigint from 'https://deno.land/x/polkadot/x-bigint/mod.ts';
export * as xFetch from 'https://deno.land/x/polkadot/x-fetch/mod.ts';
export * as xGlobal from 'https://deno.land/x/polkadot/x-global/mod.ts';
export * as xRandomvalues from 'https://deno.land/x/polkadot/x-randomvalues/mod.ts';
export * as xTextdecoder from 'https://deno.land/x/polkadot/x-textdecoder/mod.ts';
export * as xTextencoder from 'https://deno.land/x/polkadot/x-textencoder/mod.ts';
export * as xWs from 'https://deno.land/x/polkadot/x-ws/mod.ts';
+17
View File
@@ -0,0 +1,17 @@
{
"imports": {
"https://deno.land/x/polkadot/x-bigint/": "../packages/x-bigint/build-deno/",
"https://deno.land/x/polkadot/x-fetch/": "../packages/x-fetch/build-deno/",
"https://deno.land/x/polkadot/util/": "../packages/util/build-deno/",
"https://deno.land/x/polkadot/x-textdecoder/": "../packages/x-textdecoder/build-deno/",
"https://deno.land/x/polkadot/x-randomvalues/": "../packages/x-randomvalues/build-deno/",
"https://deno.land/x/polkadot/x-textencoder/": "../packages/x-textencoder/build-deno/",
"https://deno.land/x/polkadot/hw-ledger/": "../packages/hw-ledger/build-deno/",
"https://deno.land/x/polkadot/hw-ledger-transports/": "../packages/hw-ledger-transports/build-deno/",
"https://deno.land/x/polkadot/networks/": "../packages/networks/build-deno/",
"https://deno.land/x/polkadot/keyring/": "../packages/keyring/build-deno/",
"https://deno.land/x/polkadot/x-global/": "../packages/x-global/build-deno/",
"https://deno.land/x/polkadot/x-ws/": "../packages/x-ws/build-deno/",
"https://deno.land/x/polkadot/util-crypto/": "../packages/util-crypto/build-deno/"
}
}
+27
View File
@@ -0,0 +1,27 @@
// Copyright 2017-2022 @polkadot/util 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 2017-${new Date().getFullYear()} @polkadot/util 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`);
+3
View File
@@ -19,6 +19,9 @@
"build:release": "polkadot-ci-ghact-build",
"build:rollup": "polkadot-exec-rollup --config",
"clean": "polkadot-dev-clean-build",
"deno": "yarn build && 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",
"networks:crosscheck": "polkadot-dev-run-test packages/networks/src/crosscheck",
"postinstall": "polkadot-dev-yarn-only",