Skip to content

Commit

Permalink
fix: update sqs-consumer and sqs-producer to fix graceful shutdown (#83)
Browse files Browse the repository at this point in the history
* chore: update sqs-consumer and sqs-producer

* fix: aws-sdk version

* fix: update aws-sdk version

* fix(sqs-consumer): tests

* fix(sqs-consumer): tests with pnpm
  • Loading branch information
eduardoazevedo3 authored Jul 12, 2024
1 parent dc6fa15 commit 956d052
Show file tree
Hide file tree
Showing 3 changed files with 804 additions and 636 deletions.
40 changes: 26 additions & 14 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,31 +5,43 @@ on: push
jobs:
test:
runs-on: ubuntu-22.04

strategy:
matrix:
node-version: [16.x, 18.x, 20.x]
node-version:
- 16.x
- 18.x
- 20.x

services:
elasticmq:
image: s12v/elasticmq
options: -p 9324:9324 -v /tmp/elasticmq:/etc/elasticmq --name elasticmq
image: softwaremill/elasticmq
options: -p 9324:9324 --name elasticmq

steps:
- uses: actions/checkout@v3
- run: sudo cp ${{ github.workspace }}/.github/build/elasticmq.conf /tmp/elasticmq
- name: Restart elasticmq
uses: docker://docker
with:
args: docker restart elasticmq
- name: Checkout code
uses: actions/checkout@v3

- name: ElasticMQ Configuration
run: |
cp ${{ github.workspace }}/.github/build/elasticmq.conf /tmp/elasticmq.conf
docker cp /tmp/elasticmq.conf elasticmq:/opt/elasticmq.conf
docker restart elasticmq
- name: Setup pnpm
uses: pnpm/action-setup@v2

- uses: actions/setup-node@v3
name: Use Node.js ${{ matrix.node-version }}
with:
node-version: ${{ matrix.node-version }}
cache: 'pnpm'
- run: pnpm install
- name: check lint

- name: Install Dependencies
run: pnpm install

- name: Check lint
run: pnpm run lint
- name: test
env:
SQS_ENDPOINT: http://localhost:9324

- name: Run Tests
run: pnpm run test:e2e
4 changes: 2 additions & 2 deletions package.json
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,8 @@
"license": "MIT",
"dependencies": {
"@golevelup/nestjs-discovery": "^4.0.0",
"sqs-consumer": "^7.0.3",
"sqs-producer": "^3.1.1"
"sqs-consumer": "^10.3.0",
"sqs-producer": "^5.0.0"
},
"devDependencies": {
"@nestjs/common": "^10.1.3",
Expand Down
Loading

0 comments on commit 956d052

Please sign in to comment.