Skip to content

Bump the npm group in /tests/infra with 2 updates #7790

Bump the npm group in /tests/infra with 2 updates

Bump the npm group in /tests/infra with 2 updates #7790

Workflow file for this run

name: E2E Test
on:
push:
branches: [ main ]
pull_request:
branches: [ main ]
workflow_dispatch:
env:
CARGO_TERM_COLOR: always
AWS_REGION: us-west-2
permissions:
id-token: write
contents: read
jobs:
setup:
runs-on: ubuntu-24.04
outputs:
table: ${{ steps.gen-table-name.outputs.table }}
steps:
- uses: actions/checkout@v6
- name: Use Node.js 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
check-latest: true
package-manager-cache: false
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
package_json_file: tests/infra/package.json
run_install: |
- recursive: false
cwd: tests/infra
args: [--no-frozen-lockfile]
- args: [--global, aws-cdk]
- name: generate table name
id: gen-table-name
run: echo "table=csv2dynamodb-test-$(date +%Y%m%d-%H%M%S)" >> $GITHUB_OUTPUT
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }}
role-session-name: GitHubActions
aws-region: ${{ env.AWS_REGION }}
- name: Create for testing table
env:
TABLE_NAME: ${{ steps.gen-table-name.outputs.table }}
working-directory: tests/infra
run: cdk deploy -c name="${TABLE_NAME}" --require-approval=never
test:
needs: [setup]
runs-on: ubuntu-24.04
steps:
- name: Configure AWS Credentials
uses: aws-actions/configure-aws-credentials@v6
with:
aws-access-key-id: ${{ secrets.AWS_ACCESS_KEY }}
aws-secret-access-key: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
aws-region: us-west-2
- name: Update Rust toolchain
run: rustup update
- uses: actions/checkout@v6
- name: Run E2E test
run: cargo run --verbose -- --file-path ./tests/test_data2.csv --table ${{ needs.setup.outputs.table }}
tearDown:
runs-on: ubuntu-24.04
needs: [setup, test]
if: ${{ always() }}
steps:
- uses: actions/checkout@v6
- name: Use Node.js 22.x
uses: actions/setup-node@v6
with:
node-version: 22.x
check-latest: true
package-manager-cache: false
- uses: pnpm/action-setup@v4
name: Install pnpm
with:
package_json_file: tests/infra/package.json
run_install: |
- recursive: false
cwd: tests/infra
args: [--no-frozen-lockfile]
- name: Install AWS CDK and pnpm
run: |
npm -g i npm aws-cdk
- name: configure aws credentials
uses: aws-actions/configure-aws-credentials@v6
with:
role-to-assume: ${{ secrets.AWS_OIDC_ROLE_ARN }}
role-session-name: GitHubActions
aws-region: ${{ env.AWS_REGION }}
- name: Remove for testing table
env:
TABLE_NAME: ${{ needs.setup.outputs.table }}
working-directory: tests/infra
run: cdk destroy -c name="${TABLE_NAME}" -f