5555 name : Node.js test
5656 needs : affected
5757 runs-on : ubuntu-latest
58- timeout-minutes : 120
58+ timeout-minutes : ${{ fromJson(needs.affected.outputs.nodejs-setups)[matrix.path].timeout }}
5959 permissions :
6060 id-token : write # needed for google-github-actions/auth
6161 strategy :
@@ -66,28 +66,24 @@ jobs:
6666 CI_SETUP : ${{ toJson(fromJson(needs.affected.outputs.nodejs-setups)[matrix.path])}}
6767 GOOGLE_SAMPLES_PROJECT : ${{ fromJson(needs.affected.outputs.nodejs-setups)[matrix.path].project-id }}
6868 steps :
69- - run : |
70- echo node-version: ${{ fromJson(needs.affected.outputs.nodejs-setups)[matrix.path].node-version }}
71- echo node-version: ${{ fromJson(env.CI_SETUP).node-version }}
72- exit 1
69+ - name : CI Setup
70+ run : echo "${{ env.CI_SETUP }}"
7371 - uses : actions/checkout@v4
7472 with :
7573 ref : ${{ github.event.pull_request.head.sha }}
7674 - uses : actions/setup-node@v4
7775 with :
78- node-version : ${{ fromJson(needs.affected.outputs.nodejs-setups)[matrix.path] .node-version }}
76+ node-version : ${{ fromJson(env.CI_SETUP) .node-version }}
7977 - uses : google-github-actions/auth@v2
8078 with :
81- project_id : ${{ needs.affected.outputs.nodejs-setups[matrix.path] .project-id }}
82- workload_identity_provider : ${{ needs.affected.outputs.nodejs-setups[matrix.path] .workload-identity-provider }}
83- service_account : ${{ needs.affected.outputs.nodejs-setups[matrix.path] .service-account }}
84- access_token_lifetime : ${{ needs.affected.outputs.nodejs-setups[matrix.path] .access-token-lifetime }}
85- - if : needs.affected.outputs.nodejs-setups[matrix.path] .secrets != null
79+ project_id : ${{ fromJson(env.CI_SETUP) .project-id }}
80+ workload_identity_provider : ${{ fromJson(env.CI_SETUP) .workload-identity-provider }}
81+ service_account : ${{ fromJson(env.CI_SETUP) .service-account }}
82+ access_token_lifetime : ${{ fromJson(env.CI_SETUP) .access-token-lifetime }}
83+ - if : fromJson(env.CI_SETUP) .secrets != null
8684 uses : google-github-actions/get-secretmanager-secrets@v2
8785 with :
88- secrets : ${{ join(needs.affected.outputs.nodejs-setups[matrix.path] .secrets) }}
86+ secrets : ${{ join(fromJson(env.CI_SETUP) .secrets) }}
8987 export_to_environment : true
9088 - name : 🛠️ Test ${{ matrix.path }}
91- run : |
92- timeout ${{ needs.affected.outputs.nodejs-setups[matrix.path].timeout }} \
93- make test dir=${{ matrix.path }}
89+ run : make test dir=${{ matrix.path }}
0 commit comments