diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6039aa559b..3a464a7839 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -45,3 +45,27 @@ jobs: run: yarn install - name: Lint run: yarn prettier:check + e2e-connection: + runs-on: ubuntu-latest + timeout-minutes: 30 + env: + NETWORK: cayenne + MINT_NEW: true + DEBUG: true + steps: + - name: Checkout repo + uses: actions/checkout@v2 + with: + fetch-depth: 0 + - name: Set up Node.js + uses: actions/setup-node@v3 + with: + node-version: '18' + - name: Install project dependencies + run: yarn install + - name: Build packages + id: build + run: yarn build + - name: Run End to End Tests + if: steps.build.outputs.exit_code == 0 + run: yarn test:e2e:node --group=connection --group=lit-actions --group=pkp-auth-method --group=pkp-ethers \ No newline at end of file diff --git a/e2e-nodejs/index.mjs b/e2e-nodejs/index.mjs index 82109af794..fe6b5e5654 100644 --- a/e2e-nodejs/index.mjs +++ b/e2e-nodejs/index.mjs @@ -66,17 +66,29 @@ async function main() { const mode = process.argv.includes('--parallel') ? 'parallel' : 'async'; const args = process.argv.slice(2); const filesArg = args.find((arg) => arg.startsWith('--filter')); - const groupArg = args.find((arg) => arg.startsWith('--group')); + const groupArgs = args.filter((arg) => arg.startsWith('--group')); + let filesValue = filesArg ? filesArg.split('=')[1] : null; - let groupValue = groupArg ? groupArg.split('=')[1] : null; + + let groupValues = groupArgs + ? groupArgs.map((group) => group.split('=')[1]) + : []; + filesValue = filesValue ? filesValue.split(',') : null; let files = getFilesFromDir(DIR).filter((file) => { return filesValue ? filesValue.some((value) => file.includes(value)) : true; }); - if (groupValue) { - files = files.filter((file) => file.includes(`group-${groupValue}`)); + if (groupValues.length > 0) { + let filteredFiles = []; + for (const groupValue of groupValues) { + console.log('group ', groupValue); + filteredFiles = filteredFiles.concat( + files.filter((file) => file.includes(`group-${groupValue}`)) + ); + } + files = filteredFiles; } if (files.length <= 0) { @@ -94,8 +106,8 @@ async function main() { '\n --------------------------------------------------------------------------------' ); - if (groupValue) { - console.log(`\nšŸš€ Running tests in group: ${groupValue}`); + if (groupValues) { + console.log(`\nšŸš€ Running tests in group: ${groupValues}`); } let currentGroup = null; let errorCounter = 0; diff --git a/tools/scripts/tools.mjs b/tools/scripts/tools.mjs index 99b10c9fa9..7b6ebeeb41 100644 --- a/tools/scripts/tools.mjs +++ b/tools/scripts/tools.mjs @@ -497,6 +497,9 @@ async function buildFunc() { await childRunCommand(`yarn nx run ${TARGET}:_buildTsc`); spawnListener(`yarn nx run ${TARGET}:_buildWeb`); + await childRunCommand( + `yarn tools --postBuildIndividual --target ${TARGET}` + ); await childRunCommand(`yarn postBuild:mapDistFolderNameToPackageJson`); await childRunCommand(`yarn postBuild:mapDepsToDist`); await childRunCommand(`yarn gen:html`);