diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..1cdef87 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,18 @@ +name: Test + +on: push + +jobs: + unit: + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + - uses: actions/setup-node@v3 + with: + node-version: 20.x + - run: corepack enable + - run: yarn install --frozen-lockfile + - run: yarn lint + - run: docker compose up -d nsqd nsqlookupd + - run: yarn test diff --git a/docker-compose.yml b/docker-compose.yml new file mode 100644 index 0000000..16706c3 --- /dev/null +++ b/docker-compose.yml @@ -0,0 +1,18 @@ +version: '3.7' + +services: + nsqd: + image: nsqio/nsq:v1.3.0 + command: /nsqd -broadcast-address=127.0.0.1 -lookupd-tcp-address=nsqlookupd:4160 + depends_on: + - nsqlookupd + ports: + - 4150:4150 + - 4151:4151 + + nsqlookupd: + image: nsqio/nsq:v1.3.0 + command: /nsqlookupd + ports: + - 4160:4160 + - 4161:4161