Skip to content

fix(ci): strip @mentions from dependabot major version analysis comments #19

fix(ci): strip @mentions from dependabot major version analysis comments

fix(ci): strip @mentions from dependabot major version analysis comments #19

Workflow file for this run

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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # 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@37802adc94f370d6bfd71619e3f0bf239e1f3b78 # 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@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7
with:
name: coverage-report
path: coverage/
- name: Pack tarball
if: matrix.node-version == '20.x'
run: npm pack
- name: Install from tarball
if: matrix.node-version == '20.x'
run: npm install -g aws-agentcore-*.tgz
- name: Verify packaged CLI runs
if: matrix.node-version == '20.x'
run: |
agentcore --version
agentcore create --name sanitytest --language Python --framework Strands --model-provider Bedrock --memory none --json
test -f sanitytest/agentcore/agentcore.json
- name: Upload tarball artifact
if: matrix.node-version == '20.x'
uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # 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@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
persist-credentials: false
- name: Download coverage artifact
uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8
with:
name: coverage-report
path: coverage/
- name: Coverage Report
uses: davelosert/vitest-coverage-report-action@02f3c2e641286b7fa308cd3e430783103ce6103b # 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 }'