Replies: 1 comment
-
Hi, @rykr. You can check the instructions at Contributing.md#running-tests 🙋🏻♂️ In addition to the documentation, I personally like to run the tests using Docker.
The structure:
./docker-compose.yml # version: '3.9' # previous Docker versions
services:
db:
image: bitnami/mysql
# image: mysql:latest
# platform: linux/amd64 # mysql 5.7
restart: always
environment:
MYSQL_DATABASE: 'test'
ALLOW_EMPTY_PASSWORD: 'yes' # bitnami/mysql
MYSQL_ALLOW_EMPTY_PASSWORD: 'yes' # mysql
ports:
- '127.0.0.1:3306:3306'
healthcheck:
test: ['CMD', 'mysqladmin', 'ping', '-h', 'localhost', '-u', 'root']
interval: 10s
timeout: 5s
retries: 5
node-mysql2:
image: node:22-alpine
working_dir: /usr/app
volumes:
- ./node-mysql2:/usr/app
command: npm run test
# command: npm run coverage-test
environment:
MYSQL_HOST: db
CI: 1
# MYSQL_USE_COMPRESSION: 0
# MYSQL_USE_TLS: 0
FILTER:
depends_on:
db:
condition: service_healthy
bun-mysql2:
image: oven/bun:alpine
working_dir: /usr/app
volumes:
- ./node-mysql2:/usr/app
command: bun run test:bun
environment:
MYSQL_HOST: db
CI: 1
# MYSQL_USE_COMPRESSION: 0
# MYSQL_USE_TLS: 0
FILTER: test-select-1|test-select-ssl
depends_on:
db:
condition: service_healthy
deno-mysql2:
image: denoland/deno:alpine
working_dir: /usr/app
volumes:
- ./node-mysql2:/usr/app
command: deno task test:deno
environment:
MYSQL_HOST: db
CI: 1
# MYSQL_USE_COMPRESSION: 0
# MYSQL_USE_TLS: 0
FILTER:
depends_on:
db:
condition: service_healthy Then: docker compose up node-mysql2 # Testing with Node.js
docker compose up bun-mysql2 # Testing with Bun
docker compose up deno-mysql2 # Testing with Deno |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Are there some docs for running the test suite?
Beta Was this translation helpful? Give feedback.
All reactions