diff --git a/.github/workflows/integrationTest.yml b/.github/workflows/integrationTest.yml new file mode 100644 index 0000000..c8be2ff --- /dev/null +++ b/.github/workflows/integrationTest.yml @@ -0,0 +1,18 @@ +name: Test_Integration +on: + push: + branches: [master] + +jobs: + test: + runs-on: ubuntu-latest + steps: + - name: Check out repository code + uses: actions/checkout@v2 + - name: Run changed files through test script + run: | + npm i + npm install -g ts-node + ts-node ${{ github.workspace }}/.github/workflows/testImports.ts + env: + ETHEREUM_RPC: ETHEREUM_RPC \ No newline at end of file diff --git a/.github/workflows/testImports.ts b/.github/workflows/testImports.ts new file mode 100644 index 0000000..73a90f5 --- /dev/null +++ b/.github/workflows/testImports.ts @@ -0,0 +1,9 @@ +import { readdirSync } from "fs" + +function getDirectories(source: string) { + return readdirSync(source, { withFileTypes: true }) + .map(dirent => dirent.name) +} + +const emission_keys = getDirectories(`./protocols`) +Promise.all(emission_keys.map(k=>import(`../../protocols/${k}`))) \ No newline at end of file