Bump axios from 1.13.5 to 1.15.0 in /clients/staking #347
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Connectors CI/CD | |
| on: | |
| pull_request: | |
| jobs: | |
| detect-targets: | |
| runs-on: ubuntu-latest | |
| outputs: | |
| modified_targets: ${{ steps.filter.outputs.modified_targets }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| with: | |
| fetch-depth: 2 | |
| - name: Detect modified targets | |
| id: filter | |
| run: | | |
| MODIFIED_TARGETS=() | |
| # Ensure HEAD^ exists | |
| if git rev-parse --verify HEAD^ >/dev/null 2>&1; then | |
| BASE_COMMIT="HEAD^" | |
| else | |
| BASE_COMMIT=$(git rev-list --max-parents=0 HEAD) # First commit | |
| fi | |
| # Check common directory | |
| if ! git diff --quiet "$BASE_COMMIT" HEAD -- "common"; then | |
| echo "Changes detected in common" | |
| MODIFIED_TARGETS+=("common") | |
| fi | |
| # Check each client dynamically | |
| for client in clients/*; do | |
| CLIENT_NAME=$(basename "$client") | |
| if ! git diff --quiet "$BASE_COMMIT" HEAD -- "$client"; then | |
| echo "Changes detected in $CLIENT_NAME" | |
| MODIFIED_TARGETS+=("$CLIENT_NAME") | |
| fi | |
| done | |
| # Convert to JSON array format | |
| MODIFIED_TARGETS_JSON=$(printf '%s\n' "${MODIFIED_TARGETS[@]}" | jq -R -s -c 'split("\n") | map(select(. != ""))') | |
| echo "Detected modified targets: $MODIFIED_TARGETS_JSON" | |
| echo "modified_targets=$MODIFIED_TARGETS_JSON" >> $GITHUB_ENV | |
| echo "::set-output name=modified_targets::$MODIFIED_TARGETS_JSON" | |
| build-target: | |
| runs-on: ubuntu-latest | |
| needs: detect-targets | |
| if: ${{ needs.detect-targets.outputs.modified_targets != '[]' }} | |
| strategy: | |
| matrix: | |
| target: ${{ fromJson(needs.detect-targets.outputs.modified_targets) }} | |
| node-version: [22.x] | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@v3 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v3 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| cache-dependency-path: ${{ matrix.target == 'common' && 'common/package-lock.json' || format('clients/{0}/package-lock.json', matrix.target) }} | |
| - name: Build ${{ matrix.target }} | |
| run: | | |
| if [ "${{ matrix.target }}" == "common" ]; then | |
| cd common | |
| else | |
| cd clients/${{ matrix.target }} | |
| fi | |
| # Install dependencies | |
| npm install | |
| # Format | |
| npm run format | |
| # Lint | |
| npm run lint | |
| # Test | |
| npm run test | |
| # Build | |
| npm run build |