Bump brace-expansion from 1.1.12 to 1.1.13 #13513
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: PR Checks | |
| on: | |
| pull_request: | |
| branches: | |
| - main | |
| # The only commits that will contain changes to the masterlist will be releases | |
| paths-ignore: | |
| - MASTERLIST.md | |
| env: | |
| UPSTREAM_BRANCH: origin/${{ github.base_ref }} | |
| concurrency: | |
| group: pr-${{ github.event.pull_request.number }}-checks | |
| cancel-in-progress: true | |
| jobs: | |
| # ---------- Initial steps ---------- | |
| # Check that the changes introduced in this PR include changesets for packages that would need them | |
| check-changesets: | |
| name: Adapter changes accompanied by a changeset | |
| runs-on: ['ubuntu-latest'] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 2 | |
| - name: Check whether adapter change also has a changeset | |
| id: adapter_change_has_changeset | |
| run: ./.github/scripts/validate-changesets.sh | |
| validate-changeset-packages: | |
| name: Changeset package references exist in repo | |
| runs-on: [ubuntu-latest] | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up Node and Yarn | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: Enable Yarn from packageManager | |
| run: corepack enable | |
| - name: Check that changeset package references exist in repo | |
| run: | | |
| EXISTING=$(./.github/scripts/list-packages-adapters.sh | jq -r '.packages[].name' | sort -u) | |
| REFERENCED=$(./.github/scripts/get-unreleased-packages.sh | sed 's/^- //' | sort -u) | |
| BAD=$(echo "$REFERENCED" | while read p; do echo "$EXISTING" | grep -qFx "$p" || echo "$p"; done) | |
| if [ -n "$BAD" ]; then | |
| echo "::error::The following packages are referenced in .changeset but do not exist in the repo:" | |
| echo "$BAD" | while read p; do | |
| FILES=$(for f in .changeset/*.md; do [ "$(basename "$f")" = "README.md" ] && continue; grep -qF "'$p'" "$f" 2>/dev/null && echo "$f"; done) | |
| echo "::error:: - $p" | |
| echo "$FILES" | while read f; do [ -n "$f" ] && echo "::error:: mentioned in: $f"; done | |
| done | |
| exit 1 | |
| fi | |
| # Set up yarn and install dependencies, caching them to be reused across other steps in this workflow | |
| install-packages: | |
| name: Install and verify dependencies | |
| runs-on: [ubuntu-latest] | |
| outputs: | |
| changed-packages: ${{ steps.changed-adapters.outputs.CHANGED_PACKAGES }} | |
| adapter-list: ${{ steps.changed-adapters.outputs.CHANGED_ADAPTERS }} | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| with: | |
| base-branch: origin/${{ github.base_ref }} | |
| - name: Verify no files were modified by yarn install | |
| run: | | |
| # Check if any files were modified by yarn install | |
| if ! git diff --exit-code; then | |
| echo "::error::Running 'yarn install' resulted in file changes. Please run 'yarn install' locally and commit the changes." | |
| echo "Changed files:" | |
| git diff --name-only | |
| exit 1 | |
| fi | |
| echo "✅ No file changes after yarn install" | |
| - name: Build list of changed packages and changed adapters | |
| id: changed-adapters | |
| run: ./.github/scripts/changed-adapters.sh | |
| detect-streams-adapter-changes: | |
| name: Detect streams adapter changes | |
| runs-on: [ubuntu-latest] | |
| outputs: | |
| streams-adapter-changed: ${{ steps.filter.outputs.streams }} | |
| permissions: | |
| pull-requests: read | |
| steps: | |
| - name: Detect whether streams adapter changed | |
| id: filter | |
| uses: dorny/paths-filter@de90cc6fb38fc0963ad72b210f1f284cd68cea36 # v3.0.2 | |
| with: | |
| filters: | | |
| streams: | |
| - 'packages/streams-adapter/**' | |
| # ---------- Adapter checks (only for changed EAs) ---------- | |
| # Check that there are no compilation errors in test. | |
| # There are many existing tests with compilation errors, so we skip them | |
| # until we can fix them. | |
| compile-tests: | |
| name: Compile tests for changed packages | |
| runs-on: [ubuntu-latest] | |
| if: needs.install-packages.outputs.changed-packages != '[]' | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Compile tests | |
| env: | |
| CHANGED_PACKAGES: ${{ needs.install-packages.outputs.changed-packages }} | |
| run: | | |
| echo "Tests that should compile:" | |
| configs_to_compile=($(echo "$CHANGED_PACKAGES" | jq '.[].location + "/tsconfig.test.json"' -r || true)) | |
| if [ ${#configs_to_compile[@]} -eq 0 ]; then | |
| echo "No tests to compile." | |
| else | |
| yarn tsc -b --noEmit "${configs_to_compile[@]}" | |
| fi | |
| # Run unit tests | |
| unit-tests: | |
| name: Run unit tests for changed adapters | |
| runs-on: [ubuntu-latest] | |
| if: needs.install-packages.outputs.changed-packages != '[]' | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Run unit tests | |
| env: | |
| CHANGED_PACKAGES: ${{ needs.install-packages.outputs.changed-packages }} | |
| run: yarn test --passWithNoTests $(echo $CHANGED_PACKAGES | jq '.[].location + "/test/unit"' -r | tr '\n' ' ') | |
| streams-unit-tests: | |
| name: Run Go unit tests for streams adapter | |
| runs-on: [ubuntu-latest] | |
| if: needs.detect-streams-adapter-changes.outputs.streams-adapter-changed == 'true' | |
| needs: | |
| - detect-streams-adapter-changes | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up Go | |
| uses: actions/setup-go@v5 | |
| with: | |
| go-version-file: packages/streams-adapter/go.mod | |
| - name: Run streams adapter unit tests | |
| run: | | |
| cd packages/streams-adapter | |
| go test ./... | |
| # Run integration tests | |
| integration-tests: | |
| name: Run integration tests for changed adapters | |
| runs-on: [ubuntu-latest] | |
| if: needs.install-packages.outputs.changed-packages != '[]' | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Run integration tests | |
| env: | |
| CHANGED_PACKAGES: ${{ needs.install-packages.outputs.changed-packages }} | |
| run: yarn test --passWithNoTests $(echo $CHANGED_PACKAGES | jq '.[].location + "/test/integration"' -r | tr '\n' ' ') | |
| # Run non-unit, non-integration tests | |
| non-unit-non-integration-tests: | |
| name: Run non-unit, non-integration tests for changed packages | |
| runs-on: [ubuntu-latest] | |
| if: needs.install-packages.outputs.changed-packages != '[]' | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| permissions: | |
| contents: read | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Run tests | |
| env: | |
| CHANGED_PACKAGES: ${{ needs.install-packages.outputs.changed-packages }} | |
| run: | | |
| # TODO: Reduce the ignored patterns to only /dist/, /test/unit/ and | |
| # /test/integration/ by making the other tests actually pass. | |
| yarn test --passWithNoTests $(echo $CHANGED_PACKAGES | jq '.[].location + "/"' -r | tr '\n' ' ') --testPathIgnorePatterns="$(echo $CHANGED_PACKAGES | jq --raw-output 'map(.location | . + "/dist/|" + . + "/test/unit/|" + . + "/test/integration") | join("|")')|/test/e2e/|/test/transports/" | |
| # Run linters | |
| linters: | |
| name: Run linters and formatters | |
| runs-on: [ubuntu-latest] | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Lint all files | |
| run: yarn lint | |
| - name: Check for formatting errors | |
| run: yarn format:check | |
| # Run documentation tests (check that the doc generation succeeds to avoid problems downstream) | |
| run-documentation-check: | |
| name: Documentation generation test | |
| runs-on: [ubuntu-latest] | |
| if: needs.install-packages.outputs.changed-packages != '[]' | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| env: | |
| METRICS_ENABLED: false | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| with: | |
| fetch-depth: 0 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Test Master List Generation | |
| run: yarn generate:master-list -v | |
| - name: Test README Generation | |
| run: yarn generate:readme -v | |
| # Run a script to check that modified v3 adapters have the latest framework version | |
| ea-framework-version-check: | |
| name: Check that changed adapters have the latest EA framework version | |
| runs-on: [ubuntu-latest] | |
| if: needs.install-packages.outputs.changed-packages != '[]' | |
| needs: | |
| - check-changesets | |
| - install-packages | |
| steps: | |
| - name: Check out code | |
| uses: actions/checkout@v4 | |
| - name: Set up and install dependencies | |
| uses: ./.github/actions/setup | |
| - name: Check for outdated ea-framework dependencies | |
| env: | |
| CHANGED_PACKAGES: ${{ needs.install-packages.outputs.changed-packages }} | |
| run: | | |
| changed_packages=$(echo $CHANGED_PACKAGES | jq '.[].location' -r | tr '\n' ' ') | |
| dependency="@chainlink/external-adapter-framework" | |
| v3_packages=() | |
| outdated_packages=() | |
| packages=$(find packages -name 'package.json') | |
| latest_version=$(curl -sH "Accept: application/vnd.github.v3+json" "https://api.github.com/repos/smartcontractkit/ea-framework-js/contents/package.json" | jq -r '.content' | base64 -d | jq -r '.version') | |
| # get the list of v3 EAs | |
| for file in $(echo $packages); do | |
| if jq -e ".dependencies[\"$dependency\"]" "$file" >/dev/null; then | |
| v3_packages+=("$(dirname $file)") | |
| fi | |
| done | |
| # check if changed code is part of any v3 EA | |
| for changedFile in $changed_packages; do | |
| for package in "${v3_packages[@]}"; do | |
| if [[ "$changedFile" == "$package"* ]]; then | |
| # found change in v3 EA, comparing versions | |
| local_version=$(jq -r ".dependencies[\"$dependency\"]" "$package/package.json") | |
| if [ "$local_version" != "$latest_version" ] && ! grep -q "^$package$" <<< "${outdated_packages[@]}"; then | |
| outdated_packages+=("$package") | |
| fi | |
| fi | |
| done | |
| done | |
| # print and error if there are outdated adapters | |
| if [ ${#outdated_packages[@]} -gt 0 ]; then | |
| echo "The following packages have an outdated \"$dependency\" dependency:" | |
| for file in "${outdated_packages[@]}"; do | |
| echo "- $file" | |
| done | |
| exit 1 | |
| fi |