ci: Fix test workflows (no-changelog) (#6698)

* ci: Fix test workflows (no-changelog)

We removed `pdf-parse` in #6640, so we need to get these test PDF files from the `test-workflows` repo instead ([which has been updated to include these files](0f6ef1c804))

* remove `\n` from ids and skipList text files
This commit is contained in:
कारतोफ्फेलस्क्रिप्ट™ 2023-07-19 14:15:38 +02:00 committed by GitHub
parent c7e10130d6
commit cc29c4da74
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 13 additions and 4 deletions

View file

@ -64,8 +64,7 @@ jobs:
run: |
cp n8n/assets/n8n-logo.png /tmp/n8n-logo.png
cp n8n/assets/n8n-screenshot.png /tmp/n8n-screenshot.png
cp n8n/node_modules/pdf-parse/test/data/05-versions-space.pdf /tmp/05-versions-space.pdf
cp n8n/node_modules/pdf-parse/test/data/04-valid.pdf /tmp/04-valid.pdf
cp test-workflows/testData/pdfs/*.pdf /tmp/
shell: bash
- name: Run tests

View file

@ -232,7 +232,12 @@ export class ExecuteBatch extends BaseCommand {
if (flags.ids !== undefined) {
if (fs.existsSync(flags.ids)) {
const contents = fs.readFileSync(flags.ids, { encoding: 'utf-8' });
ids.push(...contents.split(',').filter((id) => re.exec(id)));
ids.push(
...contents
.trimEnd()
.split(',')
.filter((id) => re.exec(id)),
);
} else {
const paramIds = flags.ids.split(',');
const matchedIds = paramIds.filter((id) => re.exec(id));
@ -251,7 +256,12 @@ export class ExecuteBatch extends BaseCommand {
if (flags.skipList !== undefined) {
if (fs.existsSync(flags.skipList)) {
const contents = fs.readFileSync(flags.skipList, { encoding: 'utf-8' });
skipIds.push(...contents.split(',').filter((id) => re.exec(id)));
skipIds.push(
...contents
.trimEnd()
.split(',')
.filter((id) => re.exec(id)),
);
} else {
console.log('Skip list file not found. Exiting.');
return;