chore(deps-dev): bump flatted from 3.3.4 to 3.4.2 #1056
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: Build and Test | |
| on: | |
| push: | |
| branches: ['main'] | |
| pull_request: | |
| branches: ['main'] | |
| permissions: | |
| contents: read | |
| # Cancel in-progress runs for PRs; never cancel runs on main (merges should not abort each other) | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: ${{ github.ref != 'refs/heads/main' }} | |
| jobs: | |
| build: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 15 | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| node-version: [20.x, 22.x, 24.x] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Use Node.js ${{ matrix.node-version }} | |
| uses: actions/setup-node@v6 | |
| with: | |
| node-version: ${{ matrix.node-version }} | |
| cache: 'npm' | |
| - name: Configure git for tests | |
| run: | | |
| git config --global user.email "bedrock-agentcore-npm+ci@amazon.com" | |
| git config --global user.name "CI" | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| - run: npm ci | |
| - run: npm run build --if-present | |
| - run: npm run test:unit | |
| - run: npm run test:integ | |
| - name: Upload coverage artifact | |
| if: matrix.node-version == '20.x' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| - name: Pack tarball | |
| if: matrix.node-version == '20.x' | |
| run: npm pack | |
| - name: Upload tarball artifact | |
| if: matrix.node-version == '20.x' | |
| uses: actions/upload-artifact@v7 | |
| with: | |
| name: tarball | |
| path: '*.tgz' | |
| coverage: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| permissions: | |
| contents: read | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download coverage artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: coverage-report | |
| path: coverage/ | |
| - name: Coverage Report | |
| uses: davelosert/vitest-coverage-report-action@v2 | |
| with: | |
| json-summary-path: coverage/coverage-summary.json | |
| json-final-path: coverage/coverage-final.json | |
| vite-config-path: vitest.unit.config.ts | |
| file-coverage-mode: none | |
| coverage-thresholds: '{ "lines": 50, "branches": 50, "functions": 50, "statements": 50 }' | |
| pr-tarball: | |
| needs: build | |
| runs-on: ubuntu-latest | |
| if: github.event_name == 'pull_request' | |
| permissions: | |
| contents: write | |
| pull-requests: write | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Download tarball artifact | |
| uses: actions/download-artifact@v8 | |
| with: | |
| name: tarball | |
| path: tarball/ | |
| - name: Get tarball info | |
| id: tarball | |
| run: | | |
| TARBALL_NAME=$(ls tarball/*.tgz | head -1 | xargs basename) | |
| echo "name=$TARBALL_NAME" >> $GITHUB_OUTPUT | |
| - name: Create or update PR release | |
| id: release | |
| env: | |
| GH_TOKEN: ${{ github.token }} | |
| PR_NUMBER: ${{ github.event.pull_request.number }} | |
| TARBALL_NAME: ${{ steps.tarball.outputs.name }} | |
| run: | | |
| TAG="pr-${PR_NUMBER}-tarball" | |
| # Delete existing release if it exists (to update the tarball) | |
| gh release delete "$TAG" --yes --cleanup-tag 2>/dev/null || true | |
| # Create a new pre-release with the tarball | |
| gh release create "$TAG" \ | |
| "tarball/${TARBALL_NAME}" \ | |
| --title "PR #${PR_NUMBER} Tarball" \ | |
| --notes "Auto-generated tarball for PR #${PR_NUMBER}." \ | |
| --prerelease \ | |
| --target "${{ github.event.pull_request.head.sha }}" | |
| DOWNLOAD_URL="https://github.com/${{ github.repository }}/releases/download/${TAG}/${TARBALL_NAME}" | |
| echo "url=$DOWNLOAD_URL" >> $GITHUB_OUTPUT | |
| - name: Comment on PR | |
| uses: marocchino/sticky-pull-request-comment@v3 | |
| with: | |
| header: tarball | |
| message: | | |
| ## Package Tarball | |
| **[${{ steps.tarball.outputs.name }}](${{ steps.release.outputs.url }})** | |
| ### How to install | |
| ```bash | |
| npm install ${{ steps.release.outputs.url }} | |
| ``` |