Skip to content

Merge branch 'feature/add-cdk' into develop #119

Merge branch 'feature/add-cdk' into develop

Merge branch 'feature/add-cdk' into develop #119

Workflow file for this run

name: ci-node.js
on:
push:
branches: [main, develop]
pull_request:
branches: [main, develop]
jobs:
test:
name: Build and Test
runs-on: ubuntu-22.04
strategy:
matrix:
node: [18, 20]
steps:
- uses: actions/checkout@v4
- uses: pnpm/[email protected]
with:
version: 8
standalone: true
run_install: true
- uses: actions/setup-node@v4
name: Use Node.js ${{ matrix.node }}
with:
node-version: ${{ matrix.node }}
cache: 'pnpm'
- name: Get npm cache directory
id: npm-cache-dir
shell: bash
run: echo "dir=$(npm config get cache)" >> ${GITHUB_OUTPUT}
- name: Cache ~/.pnpm-store and ./node_modules
uses: actions/cache@v4
with:
path: |
${{ steps.npm-cache-dir.outputs.dir }}
~/.pnpm-store
./node_modules
key: scs-${{ runner.os }}-node-${{ hashFiles('**/pnpm-lock.yaml') }}
restore-keys: |
scs-${{ runner.os }}--node-
- name: Start LocalStack
uses: LocalStack/setup-localstack@main
with:
image-tag: 'latest'
install-awslocal: 'true'
configuration: |
SERVICES=s3,DEBUG=1,SKIP_SSL_CERT_DOWNLOAD=1,AWS_REGION=us-east-1,AWS_ACCESS_KEY_ID=${{ secrets.AWS_ACCESS_KEY_ID }},AWS_SECRET_ACCESS_KEY=${{ secrets.AWS_SECRET_ACCESS_KEY }}
- name: Check LocalStack readiness
run: |
while ! nc -z localhost 4566; do
echo "Waiting for LocalStack to be ready..."
sleep 1
done
echo "LocalStack is ready for use!"
- name: Run tests with coverage
run: pnpm run test:coverage
env:
IS_OFFLINE: true
AWS_ENDPOINT_URL: http://s3.localhost.localstack.cloud:4566
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}
AWS_REGION: us-east-1
- uses: codecov/codecov-action@v4
name: Upload coverage reports to Codecov
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: ./coverage
files: ./coverage/cobertura-coverage.xml,./coverage/lcov.info
fail_ci_if_error: true