From 89bb8e3e08089540a1d6317ea30e87bc0faa9a80 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:26:38 +0200 Subject: [PATCH 01/11] prettier formatting --- .github/workflows/pr-build-test.yaml | 123 +++++++++++++-------------- 1 file changed, 61 insertions(+), 62 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 048c3de..68d14ce 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -17,24 +17,23 @@ concurrency: cancel-in-progress: true jobs: - checkTestFolder: if: ${{ !inputs.skip-platform-tests }} runs-on: ubuntu-latest defaults: run: working-directory: ${{ inputs.working-directory }} - + steps: - name: Checkout uses: actions/checkout@v4 - name: Check for test folder id: check run: | - if [ ! -d "test/platform" ]; then - echo "No platform test folder found. Failing the workflow." - exit 1 - fi + if [ ! -d "test/platform" ]; then + echo "No platform test folder found. Failing the workflow." + exit 1 + fi platformTest: if: ${{ !inputs.skip-platform-tests }} @@ -47,22 +46,22 @@ jobs: - name: Checkout Repository uses: actions/checkout@v4 with: - fetch-depth: 0 + fetch-depth: 0 - uses: oNaiPs/secrets-to-env-action@b64e0192bc4bd2ec0682dee8696470d4866577fa with: - secrets: ${{ toJSON(secrets) }} + secrets: ${{ toJSON(secrets) }} - name: Pick last validated commit from cache id: base_commit uses: actions/cache@v4 with: - # We have to call it base commit for the library but it makes more sense as "last validated commit" - # Using run_id ensures the key is always unique so the cache always saves at end-of-job (no "cache hit, not saving" issue) - path: ./base_commit.txt - key: base_commit-${{ github.run_id }} - # This is needed to force overriding the cache with new entry at the end - restore-keys: base_commit- + # We have to call it base commit for the library but it makes more sense as "last validated commit" + # Using run_id ensures the key is always unique so the cache always saves at end-of-job (no "cache hit, not saving" issue) + path: ./base_commit.txt + key: base_commit-${{ github.run_id }} + # This is needed to force overriding the cache with new entry at the end + restore-keys: base_commit- - name: Install dependencies run: npm install @@ -114,51 +113,51 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Use Node.js 20 - uses: actions/setup-node@v3 - with: - node-version: 20 - cache: 'npm' - cache-dependency-path: ${{ inputs.working-directory }} # https://github.com/actions/setup-node/issues/706 - - name: Install Dependencies - run: npm ci - - - name: TypeScript - # Some repos require custom build checks, so we check if the `build-check` script exists and run it if - # it does. Otherwise default to the standard `npx tsc --noEmit` check - run: | - HAS_CUSTOM_BUILD_CHECK=$(npx -y json -f package.json scripts.build-check) - if [ -z "$HAS_CUSTOM_BUILD_CHECK" ]; then - npx tsc --noEmit; - else - npm run build-check; - fi - - - name: Lint - run: npm run lint - - - name: Test - run: npm test - - - name: Prettier Check - run: | - if [ -d "node_modules/prettier" ]; then - npx prettier --check .; - else - echo "Prettier is not installed. Skipping Prettier check."; - fi - - - name: Unused Exports Check - run: | - if [ -d "node_modules/knip" ]; then - echo "Knip is installed. Running knip to check for unused exports."; - npx knip --include exports,types; - elif [ -d "node_modules/ts-unused-exports" ]; then - echo "Knip is not installed, but ts-unused-exports is. Running ts-unused-exports to check for unused exports."; - npx ts-unused-exports ./tsconfig.json; - else - echo "knip nor ts-unused-exports are installed. Skipping unused exports check."; - fi + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Use Node.js 20 + uses: actions/setup-node@v3 + with: + node-version: 20 + cache: "npm" + cache-dependency-path: ${{ inputs.working-directory }} # https://github.com/actions/setup-node/issues/706 + - name: Install Dependencies + run: npm ci + + - name: TypeScript + # Some repos require custom build checks, so we check if the `build-check` script exists and run it if + # it does. Otherwise default to the standard `npx tsc --noEmit` check + run: | + HAS_CUSTOM_BUILD_CHECK=$(npx -y json -f package.json scripts.build-check) + if [ -z "$HAS_CUSTOM_BUILD_CHECK" ]; then + npx tsc --noEmit; + else + npm run build-check; + fi + + - name: Lint + run: npm run lint + + - name: Test + run: npm test + + - name: Prettier Check + run: | + if [ -d "node_modules/prettier" ]; then + npx prettier --check .; + else + echo "Prettier is not installed. Skipping Prettier check."; + fi + + - name: Unused Exports Check + run: | + if [ -d "node_modules/knip" ]; then + echo "Knip is installed. Running knip to check for unused exports."; + npx knip --include exports,types; + elif [ -d "node_modules/ts-unused-exports" ]; then + echo "Knip is not installed, but ts-unused-exports is. Running ts-unused-exports to check for unused exports."; + npx ts-unused-exports ./tsconfig.json; + else + echo "knip nor ts-unused-exports are installed. Skipping unused exports check."; + fi From 2b37dd560fbc5946cf8c3b0abe7cd2105f6a4819 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:30:38 +0200 Subject: [PATCH 02/11] base caching job --- .github/workflows/cache-dependencies.yaml | 30 +++++++++++++++++++++++ 1 file changed, 30 insertions(+) create mode 100644 .github/workflows/cache-dependencies.yaml diff --git a/.github/workflows/cache-dependencies.yaml b/.github/workflows/cache-dependencies.yaml new file mode 100644 index 0000000..cf38c9d --- /dev/null +++ b/.github/workflows/cache-dependencies.yaml @@ -0,0 +1,30 @@ +name: Cache Dependencies + +on: + workflow_call: + inputs: + working-directory: + type: string + default: . + required: false + +jobs: + cache-dependencies: + name: Cache Dependencies + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ inputs.working-directory }} + steps: + - uses: actions/checkout@v4 + + - name: Cache dependencies npm + id: check-dependencies-cache + uses: actions/cache@v4 + with: + path: ${{ inputs.working-directory }}/node_modules + key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} + + - name: install npm dependencies + if: steps.check-dependencies-cache.outputs.cache-hit != 'true' + run: npm ci From 487f31bb2f6b58ed31c611a1b8b04532f357e13e Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:30:50 +0200 Subject: [PATCH 03/11] cache restore composite action --- .../checkout-restore-dependencies/action.yaml | 21 +++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 .github/actions/checkout-restore-dependencies/action.yaml diff --git a/.github/actions/checkout-restore-dependencies/action.yaml b/.github/actions/checkout-restore-dependencies/action.yaml new file mode 100644 index 0000000..6619888 --- /dev/null +++ b/.github/actions/checkout-restore-dependencies/action.yaml @@ -0,0 +1,21 @@ +name: Checkout and restore dependencies +description: Checkout and restore dependencies +inputs: + working-directory: + description: Working directory + required: false + default: . + +runs: + using: "composite" + steps: + - id: checkout + uses: actions/checkout@v4 + + - name: Load cached dependencies + id: restore-dependency-cache + uses: actions/cache/restore@v4 + with: + fail-on-cache-miss: true + path: ${{ inputs.working-directory }}/node_modules + key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} From d359abde4b396c9be988e02a5aa100449495de68 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:31:07 +0200 Subject: [PATCH 04/11] cache and restore using job and composite --- .github/workflows/pr-build-test.yaml | 31 +++++++++++++++++++--------- 1 file changed, 21 insertions(+), 10 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 68d14ce..4531c8f 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -17,6 +17,11 @@ concurrency: cancel-in-progress: true jobs: + cache-dependencies: + uses: ./.github/workflows/cache-dependencies.yaml + with: + working-directory: ${{ inputs.working-directory }} + checkTestFolder: if: ${{ !inputs.skip-platform-tests }} runs-on: ubuntu-latest @@ -108,22 +113,28 @@ jobs: unitTest: # TODO: only run on changes to code runs-on: ubuntu-latest + needs: cache-dependencies defaults: run: working-directory: ${{ inputs.working-directory }} steps: - - name: Checkout repository - uses: actions/checkout@v4 - - - name: Use Node.js 20 - uses: actions/setup-node@v3 + - name: Setup repository and dependencies + uses: "./.github/actions/checkout-restore-dependencies" with: - node-version: 20 - cache: "npm" - cache-dependency-path: ${{ inputs.working-directory }} # https://github.com/actions/setup-node/issues/706 - - name: Install Dependencies - run: npm ci + working-directory: ${{ inputs.working-directory }} + + # - name: Checkout repository + # uses: actions/checkout@v4 + + # - name: Use Node.js 20 + # uses: actions/setup-node@v3 + # with: + # node-version: 20 + # cache: "npm" + # cache-dependency-path: ${{ inputs.working-directory }} # https://github.com/actions/setup-node/issues/706 + # - name: Install Dependencies + # run: npm ci - name: TypeScript # Some repos require custom build checks, so we check if the `build-check` script exists and run it if From 61a30f937415e5d95392541db853dc5f17eaea52 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:36:15 +0200 Subject: [PATCH 05/11] checkout before? --- .github/workflows/pr-build-test.yaml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 4531c8f..ff35b04 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -119,6 +119,7 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: + - uses: actions/checkout@v4 - name: Setup repository and dependencies uses: "./.github/actions/checkout-restore-dependencies" with: From ddb4f93ac5ead32ff9097bcde5b846118b12203c Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:38:50 +0200 Subject: [PATCH 06/11] wtf? --- .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 ff35b04..469f880 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -121,7 +121,7 @@ jobs: steps: - uses: actions/checkout@v4 - name: Setup repository and dependencies - uses: "./.github/actions/checkout-restore-dependencies" + uses: apify-projects/github-actions-source/.github/actions/checkout-restore-dependencies@dependency-cache with: working-directory: ${{ inputs.working-directory }} From ef92712fd21a4db5eae5128acbddfd7e2699ee13 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 09:45:44 +0200 Subject: [PATCH 07/11] remove comments and extra checkout --- .github/workflows/pr-build-test.yaml | 15 ++------------- 1 file changed, 2 insertions(+), 13 deletions(-) diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 469f880..21caf39 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -119,24 +119,13 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: - - uses: actions/checkout@v4 - name: Setup repository and dependencies + # Referenced globally, local reference failed when looking for the action in the consumer repo + # it was being looked for within the repo, not as a relative path to this job when invoked uses: apify-projects/github-actions-source/.github/actions/checkout-restore-dependencies@dependency-cache with: working-directory: ${{ inputs.working-directory }} - # - name: Checkout repository - # uses: actions/checkout@v4 - - # - name: Use Node.js 20 - # uses: actions/setup-node@v3 - # with: - # node-version: 20 - # cache: "npm" - # cache-dependency-path: ${{ inputs.working-directory }} # https://github.com/actions/setup-node/issues/706 - # - name: Install Dependencies - # run: npm ci - - name: TypeScript # Some repos require custom build checks, so we check if the `build-check` script exists and run it if # it does. Otherwise default to the standard `npx tsc --noEmit` check From 751d66d37d0cb8da396340ff9e697c48f572315f Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 10:48:00 +0200 Subject: [PATCH 08/11] version bumps out the ass --- .../checkout-restore-dependencies/action.yaml | 30 ++++++------ .github/workflows/cache-dependencies.yaml | 46 +++++++++---------- .github/workflows/platform-tests.yaml | 8 ++-- .github/workflows/pr-build-test.yaml | 6 +-- .github/workflows/push-build-latest.yaml | 12 ++--- 5 files changed, 51 insertions(+), 51 deletions(-) diff --git a/.github/actions/checkout-restore-dependencies/action.yaml b/.github/actions/checkout-restore-dependencies/action.yaml index 6619888..6418589 100644 --- a/.github/actions/checkout-restore-dependencies/action.yaml +++ b/.github/actions/checkout-restore-dependencies/action.yaml @@ -1,21 +1,21 @@ name: Checkout and restore dependencies description: Checkout and restore dependencies inputs: - working-directory: - description: Working directory - required: false - default: . + working-directory: + description: Working directory + required: false + default: . runs: - using: "composite" - steps: - - id: checkout - uses: actions/checkout@v4 + using: "composite" + steps: + - id: checkout + uses: actions/checkout@v5 - - name: Load cached dependencies - id: restore-dependency-cache - uses: actions/cache/restore@v4 - with: - fail-on-cache-miss: true - path: ${{ inputs.working-directory }}/node_modules - key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} + - name: Load cached dependencies + id: restore-dependency-cache + uses: actions/cache/restore@v5 + with: + fail-on-cache-miss: true + path: ${{ inputs.working-directory }}/node_modules + key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} diff --git a/.github/workflows/cache-dependencies.yaml b/.github/workflows/cache-dependencies.yaml index cf38c9d..31080df 100644 --- a/.github/workflows/cache-dependencies.yaml +++ b/.github/workflows/cache-dependencies.yaml @@ -1,30 +1,30 @@ name: Cache Dependencies on: - workflow_call: - inputs: - working-directory: - type: string - default: . - required: false + workflow_call: + inputs: + working-directory: + type: string + default: . + required: false jobs: - cache-dependencies: - name: Cache Dependencies - runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ inputs.working-directory }} - steps: - - uses: actions/checkout@v4 + cache-dependencies: + name: Cache Dependencies + runs-on: ubuntu-latest + defaults: + run: + working-directory: ${{ inputs.working-directory }} + steps: + - uses: actions/checkout@v5 - - name: Cache dependencies npm - id: check-dependencies-cache - uses: actions/cache@v4 - with: - path: ${{ inputs.working-directory }}/node_modules - key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} + - name: Cache dependencies npm + id: check-dependencies-cache + uses: actions/cache@v5 + with: + path: ${{ inputs.working-directory }}/node_modules + key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} - - name: install npm dependencies - if: steps.check-dependencies-cache.outputs.cache-hit != 'true' - run: npm ci + - name: install npm dependencies + if: steps.check-dependencies-cache.outputs.cache-hit != 'true' + run: npm ci diff --git a/.github/workflows/platform-tests.yaml b/.github/workflows/platform-tests.yaml index 7745528..3fb2ec9 100644 --- a/.github/workflows/platform-tests.yaml +++ b/.github/workflows/platform-tests.yaml @@ -22,13 +22,13 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: - fetch-depth: 0 + fetch-depth: 0 - uses: oNaiPs/secrets-to-env-action@b64e0192bc4bd2ec0682dee8696470d4866577fa with: - secrets: ${{ toJSON(secrets) }} + secrets: ${{ toJSON(secrets) }} - name: Install dependencies run: npm install @@ -70,4 +70,4 @@ jobs: if: always() with: name: vitest-results - path: ./test-output.json \ No newline at end of file + path: ./test-output.json diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index 21caf39..ce9857c 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -31,7 +31,7 @@ jobs: steps: - name: Checkout - uses: actions/checkout@v4 + uses: actions/checkout@v5 - name: Check for test folder id: check run: | @@ -49,7 +49,7 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: - name: Checkout Repository - uses: actions/checkout@v4 + uses: actions/checkout@v5 with: fetch-depth: 0 @@ -59,7 +59,7 @@ jobs: - name: Pick last validated commit from cache id: base_commit - uses: actions/cache@v4 + uses: actions/cache@v5 with: # We have to call it base commit for the library but it makes more sense as "last validated commit" # Using run_id ensures the key is always unique so the cache always saves at end-of-job (no "cache hit, not saving" issue) diff --git a/.github/workflows/push-build-latest.yaml b/.github/workflows/push-build-latest.yaml index 23bc2ec..0ad38b9 100644 --- a/.github/workflows/push-build-latest.yaml +++ b/.github/workflows/push-build-latest.yaml @@ -10,10 +10,10 @@ on: jobs: pushBuildLatest: - name: 'Build latest: ${{github.repository}} ${{github.event.head_commit.message}}' + name: "Build latest: ${{github.repository}} ${{github.event.head_commit.message}}" if: | - !contains(github.event.head_commit.message, '[skip ci]') && - !contains(github.event.head_commit.message, '[skip platform-test]') + !contains(github.event.head_commit.message, '[skip ci]') && + !contains(github.event.head_commit.message, '[skip platform-test]') runs-on: ubuntu-latest defaults: @@ -21,14 +21,14 @@ jobs: working-directory: ${{ inputs.working-directory }} steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@v5 with: - fetch-depth: 0 + fetch-depth: 0 # A simple node script that converts secrets to env vars # Use specific commit SHA to prevent someone stealing that repo - uses: oNaiPs/secrets-to-env-action@b64e0192bc4bd2ec0682dee8696470d4866577fa with: - secrets: ${{ toJSON(secrets) }} + secrets: ${{ toJSON(secrets) }} - name: Install dependencies run: npm install From 8bec7ecb88da07e8e845a28ba232686c12f2f788 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Wed, 8 Apr 2026 11:45:10 +0200 Subject: [PATCH 09/11] fix working directory package-lock reference --- .github/actions/checkout-restore-dependencies/action.yaml | 2 +- .github/workflows/cache-dependencies.yaml | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/actions/checkout-restore-dependencies/action.yaml b/.github/actions/checkout-restore-dependencies/action.yaml index 6418589..b9ceae7 100644 --- a/.github/actions/checkout-restore-dependencies/action.yaml +++ b/.github/actions/checkout-restore-dependencies/action.yaml @@ -18,4 +18,4 @@ runs: with: fail-on-cache-miss: true path: ${{ inputs.working-directory }}/node_modules - key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} + key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/package-lock.json', inputs.working-directory)) }} diff --git a/.github/workflows/cache-dependencies.yaml b/.github/workflows/cache-dependencies.yaml index 31080df..1b91361 100644 --- a/.github/workflows/cache-dependencies.yaml +++ b/.github/workflows/cache-dependencies.yaml @@ -23,7 +23,7 @@ jobs: uses: actions/cache@v5 with: path: ${{ inputs.working-directory }}/node_modules - key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles('package-lock.json') }} + key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/package-lock.json', inputs.working-directory)) }} - name: install npm dependencies if: steps.check-dependencies-cache.outputs.cache-hit != 'true' From cb484f1dcfb97ac01e42c57f00c201c1cb2bb7a4 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Thu, 9 Apr 2026 13:37:51 +0200 Subject: [PATCH 10/11] additional working directory for amazon --- .../checkout-restore-dependencies/action.yaml | 15 +++++++++++ .github/workflows/cache-dependencies.yaml | 25 ++++++++++++++++--- .github/workflows/pr-build-test.yaml | 5 ++++ 3 files changed, 41 insertions(+), 4 deletions(-) diff --git a/.github/actions/checkout-restore-dependencies/action.yaml b/.github/actions/checkout-restore-dependencies/action.yaml index b9ceae7..37ea8c5 100644 --- a/.github/actions/checkout-restore-dependencies/action.yaml +++ b/.github/actions/checkout-restore-dependencies/action.yaml @@ -2,9 +2,15 @@ name: Checkout and restore dependencies description: Checkout and restore dependencies inputs: working-directory: + type: string description: Working directory required: false default: . + additional-working-directory: + type: string + description: Additional working directory + required: false + default: "" runs: using: "composite" @@ -19,3 +25,12 @@ runs: fail-on-cache-miss: true path: ${{ inputs.working-directory }}/node_modules key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/package-lock.json', inputs.working-directory)) }} + + - name: Load additional cached dependencies + if: inputs.additional-working-directory != '' + id: restore-additional-dependency-cache + uses: actions/cache/restore@v5 + with: + fail-on-cache-miss: true + path: ${{ inputs.additional-working-directory }}/node_modules + key: modules-npm-${{ inputs.additional-working-directory }}-${{ hashFiles(format('{0}/package-lock.json', inputs.additional-working-directory)) }} diff --git a/.github/workflows/cache-dependencies.yaml b/.github/workflows/cache-dependencies.yaml index 1b91361..8c72e41 100644 --- a/.github/workflows/cache-dependencies.yaml +++ b/.github/workflows/cache-dependencies.yaml @@ -7,14 +7,15 @@ on: type: string default: . required: false + additional-working-directory: + type: string + required: false + default: "" jobs: cache-dependencies: name: Cache Dependencies runs-on: ubuntu-latest - defaults: - run: - working-directory: ${{ inputs.working-directory }} steps: - uses: actions/checkout@v5 @@ -25,6 +26,22 @@ jobs: path: ${{ inputs.working-directory }}/node_modules key: modules-npm-${{ inputs.working-directory }}-${{ hashFiles(format('{0}/package-lock.json', inputs.working-directory)) }} + - name: Cache additional dependencies npm + if: inputs.additional-working-directory != '' + id: check-additional-dependencies-cache + uses: actions/cache@v5 + with: + path: ${{ inputs.additional-working-directory }}/node_modules + key: modules-npm-${{ inputs.additional-working-directory }}-${{ hashFiles(format('{0}/package-lock.json', inputs.additional-working-directory)) }} + - name: install npm dependencies if: steps.check-dependencies-cache.outputs.cache-hit != 'true' - run: npm ci + run: | + cd ${{ inputs.working-directory }} + npm ci + + - name: install additional npm dependencies + if: steps.check-additional-dependencies-cache.outputs.cache-hit != 'true' + run: | + cd ${{ inputs.additional-working-directory }} + npm ci diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index ce9857c..b6d802d 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -7,6 +7,10 @@ on: type: string default: . required: false + additional-working-directory: + type: string + required: false + default: "" skip-platform-tests: type: boolean default: false @@ -21,6 +25,7 @@ jobs: uses: ./.github/workflows/cache-dependencies.yaml with: working-directory: ${{ inputs.working-directory }} + additional-working-directory: ${{ inputs.additional-working-directory }} checkTestFolder: if: ${{ !inputs.skip-platform-tests }} From 060e61ad80e6cbd0055a5fd27155f0a8194b6147 Mon Sep 17 00:00:00 2001 From: JuanGalilea Date: Thu, 9 Apr 2026 13:45:23 +0200 Subject: [PATCH 11/11] ??????????? --- .github/actions/checkout-restore-dependencies/action.yaml | 1 - .github/workflows/cache-dependencies.yaml | 1 - .github/workflows/pr-build-test.yaml | 1 - 3 files changed, 3 deletions(-) diff --git a/.github/actions/checkout-restore-dependencies/action.yaml b/.github/actions/checkout-restore-dependencies/action.yaml index 37ea8c5..858bce7 100644 --- a/.github/actions/checkout-restore-dependencies/action.yaml +++ b/.github/actions/checkout-restore-dependencies/action.yaml @@ -10,7 +10,6 @@ inputs: type: string description: Additional working directory required: false - default: "" runs: using: "composite" diff --git a/.github/workflows/cache-dependencies.yaml b/.github/workflows/cache-dependencies.yaml index 8c72e41..1ad476f 100644 --- a/.github/workflows/cache-dependencies.yaml +++ b/.github/workflows/cache-dependencies.yaml @@ -10,7 +10,6 @@ on: additional-working-directory: type: string required: false - default: "" jobs: cache-dependencies: diff --git a/.github/workflows/pr-build-test.yaml b/.github/workflows/pr-build-test.yaml index b6d802d..0587957 100644 --- a/.github/workflows/pr-build-test.yaml +++ b/.github/workflows/pr-build-test.yaml @@ -10,7 +10,6 @@ on: additional-working-directory: type: string required: false - default: "" skip-platform-tests: type: boolean default: false