From 9ff4e21b59ff2d88a35d0e41d21d2d36c7cff400 Mon Sep 17 00:00:00 2001 From: Sviat Date: Tue, 12 May 2026 13:21:07 +0300 Subject: [PATCH 01/11] feat: verify input schemas if present --- .github/workflows/pr-build-test.yaml | 10 ++++++++++ 1 file changed, 10 insertions(+) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index aa7d273..4de31d8 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -112,6 +112,16 @@ jobs: - name: Lint run: npm run lint + - name: Input Schema Validation + # `apify vis` fail code is changed from 1 to 255 so xargs aborts on first error. + run: | + if [ -d ./.actor ]; then + apify vis + fi + if [ -d ./actors ]; then + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify vis || exit 255' + fi + - name: Test run: npm test From 78f246ebef820ff6623477d44eb1acec8e5b0af1 Mon Sep 17 00:00:00 2001 From: Sviat Date: Tue, 12 May 2026 16:57:43 +0300 Subject: [PATCH 02/11] fix: init apify cli --- .github/workflows/pr-build-test.yaml | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 4de31d8..7a58bc4 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -112,13 +112,18 @@ jobs: - name: Lint run: npm run lint + - name: Install Apify CLI + run: npm install -g apify-cli + - name: Input Schema Validation - # `apify vis` fail code is changed from 1 to 255 so xargs aborts on first error. run: | + # let apify cli initialize its config to avoid race conditions with xargs + apify --version >/dev/null 2>&1 if [ -d ./.actor ]; then apify vis fi if [ -d ./actors ]; then + # `apify vis` fail code is changed from 1 to 255 so xargs aborts on first error. cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify vis || exit 255' fi From bf812785f31642332643f745be0268e90005d0a4 Mon Sep 17 00:00:00 2001 From: Sviat Date: Wed, 13 May 2026 14:29:22 +0300 Subject: [PATCH 03/11] fix: vis -> validate-schema --- .github/workflows/pr-build-test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 7a58bc4..6302d99 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -120,11 +120,11 @@ jobs: # let apify cli initialize its config to avoid race conditions with xargs apify --version >/dev/null 2>&1 if [ -d ./.actor ]; then - apify vis + apify validate-schema fi if [ -d ./actors ]; then - # `apify vis` fail code is changed from 1 to 255 so xargs aborts on first error. - cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify vis || exit 255' + # `apify validate-schema` fail code is changed from 1 to 255 so xargs aborts on first error. + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify validate-schema || exit 255' fi - name: Test From fe8430ffe8ff581f554b531127cb94c80674d0b6 Mon Sep 17 00:00:00 2001 From: Sviat Date: Wed, 13 May 2026 15:04:45 +0300 Subject: [PATCH 04/11] fix: some remarks --- .github/workflows/pr-build-test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 6302d99..971c335 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -123,8 +123,7 @@ jobs: apify validate-schema fi if [ -d ./actors ]; then - # `apify validate-schema` fail code is changed from 1 to 255 so xargs aborts on first error. - cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify validate-schema || exit 255' + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify validate-schema || echo "::error::Schema validation failed in actor: {}"' fi - name: Test From 56b8479246f80deb776e97e83ffbf924ca997623 Mon Sep 17 00:00:00 2001 From: Sviat Date: Wed, 13 May 2026 15:13:35 +0300 Subject: [PATCH 05/11] fix: use npx apify --- .github/workflows/pr-build-test.yaml | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 971c335..60a6852 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -112,18 +112,19 @@ jobs: - name: Lint run: npm run lint - - name: Install Apify CLI - run: npm install -g apify-cli - - name: Input Schema Validation run: | + if [ ! -d "node_modules/apify-cli" ]; then + echo "::warning::apify-cli is not installed as an npm dependency. Skipping schema validation." + exit 0 + fi # let apify cli initialize its config to avoid race conditions with xargs - apify --version >/dev/null 2>&1 + npx apify --version >/dev/null 2>&1 if [ -d ./.actor ]; then - apify validate-schema + npx apify validate-schema fi if [ -d ./actors ]; then - cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify validate-schema || echo "::error::Schema validation failed in actor: {}"' + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && npx apify validate-schema || echo "::error::Schema validation failed in actor: {}"' fi - name: Test From db063c6f959ddc7519db8eeb1d9825cc14507ce9 Mon Sep 17 00:00:00 2001 From: Sviat Date: Wed, 13 May 2026 16:35:54 +0300 Subject: [PATCH 06/11] d --- .github/workflows/pr-build-test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 60a6852..d6aa7ce 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -118,8 +118,7 @@ jobs: echo "::warning::apify-cli is not installed as an npm dependency. Skipping schema validation." exit 0 fi - # let apify cli initialize its config to avoid race conditions with xargs - npx apify --version >/dev/null 2>&1 + npx apify telemetry disable >/dev/null 2>&1 if [ -d ./.actor ]; then npx apify validate-schema fi From 5a00925199089ad497e8e47691a45a3259d4ab96 Mon Sep 17 00:00:00 2001 From: Sviat Date: Wed, 13 May 2026 16:41:04 +0300 Subject: [PATCH 07/11] fix: use code --- .github/workflows/pr-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index d6aa7ce..66b4aac 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -123,7 +123,7 @@ jobs: npx apify validate-schema fi if [ -d ./actors ]; then - cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && npx apify validate-schema || echo "::error::Schema validation failed in actor: {}"' + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify validate-schema || { echo "::error::Schema validation failed in actor: {}"; exit 1; }' fi - name: Test From f8ad147cc2dbcb0d3c2ff1174125ee00a9f93900 Mon Sep 17 00:00:00 2001 From: Sviat Date: Wed, 13 May 2026 17:03:24 +0300 Subject: [PATCH 08/11] duh --- .github/workflows/pr-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 66b4aac..e0407be 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -123,7 +123,7 @@ jobs: npx apify validate-schema fi if [ -d ./actors ]; then - cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && apify validate-schema || { echo "::error::Schema validation failed in actor: {}"; exit 1; }' + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && npx apify validate-schema || { echo "::error::Schema validation failed in actor: {}"; exit 1; }' fi - name: Test From cc7a43effcc55af028b259d5d599f4dc758dff8a Mon Sep 17 00:00:00 2001 From: Sviat Date: Thu, 14 May 2026 11:20:42 +0300 Subject: [PATCH 09/11] fix: auto-install apify cli --- .github/workflows/pr-build-test.yaml | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index e0407be..09d2164 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -115,10 +115,9 @@ jobs: - name: Input Schema Validation run: | if [ ! -d "node_modules/apify-cli" ]; then - echo "::warning::apify-cli is not installed as an npm dependency. Skipping schema validation." - exit 0 + echo "::warning::apify-cli is not installed as an npm dependency. Improve CI speed by installing it" fi - npx apify telemetry disable >/dev/null 2>&1 + npx --yes apify telemetry disable >/dev/null 2>&1 if [ -d ./.actor ]; then npx apify validate-schema fi From e596fa74ce4718c01f93fd8c464e61f49f26e93e Mon Sep 17 00:00:00 2001 From: Sviat Date: Thu, 14 May 2026 11:41:05 +0300 Subject: [PATCH 10/11] fix: do not silence errors --- .github/workflows/pr-build-test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 09d2164..9628378 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -117,7 +117,7 @@ jobs: if [ ! -d "node_modules/apify-cli" ]; then echo "::warning::apify-cli is not installed as an npm dependency. Improve CI speed by installing it" fi - npx --yes apify telemetry disable >/dev/null 2>&1 + npx --yes apify telemetry disable if [ -d ./.actor ]; then npx apify validate-schema fi From acad2a356765cc7cf1a5f0f48fddd70975bb678b Mon Sep 17 00:00:00 2001 From: Sviat Date: Thu, 14 May 2026 11:48:36 +0300 Subject: [PATCH 11/11] fix: use apify-cli --- .github/workflows/pr-build-test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 9628378..3a49ac3 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -117,12 +117,12 @@ jobs: if [ ! -d "node_modules/apify-cli" ]; then echo "::warning::apify-cli is not installed as an npm dependency. Improve CI speed by installing it" fi - npx --yes apify telemetry disable + npx --yes apify-cli telemetry disable if [ -d ./.actor ]; then - npx apify validate-schema + npx apify-cli validate-schema fi if [ -d ./actors ]; then - cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && npx apify validate-schema || { echo "::error::Schema validation failed in actor: {}"; exit 1; }' + cd ./actors && ls | xargs -P 8 -I {} sh -c 'cd {} && npx apify-cli validate-schema || { echo "::error::Schema validation failed in actor: {}"; exit 1; }' fi - name: Test