fix: add decodeuricomponent to parse uri encoded special characters in host, username, password and datbase keys #520
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI - Linux (bun) | |
# this will be merged with ci-linux.yml | |
on: | |
pull_request: | |
push: | |
branches: [ main ] | |
workflow_dispatch: | |
env: | |
MYSQL_PORT: 3306 | |
MYSQL_USER: root | |
MYSQL_DATABASE: test | |
jobs: | |
tests-linux: | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
bun-version: [canary] | |
mysql-version: ["mysql:5.7", "mysql:8.0.18", "mysql:8.0.22"] | |
use-compression: [0, 1] | |
use-tls: [0,1] | |
include: | |
- bun-version: "0.6.13" | |
use-compression: 1 | |
use-tls: 0 | |
mysql-version: "mysql:8.0.18" | |
- bun-version: "0.6.13" | |
use-compression: 1 | |
use-tls: 0 | |
mysql-version: "mysql:8.0.22" | |
name: Bun ${{ matrix.bun-version }} - DB ${{ matrix.mysql-version }} - SSL=${{matrix.use-tls}} Compression=${{matrix.use-compression}} | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Set up MySQL | |
run: docker run -d -e MYSQL_ALLOW_EMPTY_PASSWORD=1 -e MYSQL_DATABASE=${{ env.MYSQL_DATABASE }} -v $PWD/mysqldata:/var/lib/mysql/ -v $PWD/examples/custom-conf:/etc/mysql/conf.d -v $PWD/examples/ssl/certs:/certs -p ${{ env.MYSQL_PORT }}:3306 ${{ matrix.mysql-version }} | |
- name: Set up Bun ${{ matrix.bun-version }} | |
uses: oven-sh/setup-bun@v1 | |
with: | |
bun-version: ${{ matrix.bun-version }} | |
- name: Set up Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: 18 | |
- name: Cache dependencies | |
uses: actions/cache@v3 | |
with: | |
path: ~/.npm | |
key: npm-${{ hashFiles('package-lock.json') }} | |
restore-keys: npm- | |
- name: Install npm dependencies | |
run: npm ci | |
# - name: Install npm dependencies | |
# run: bun install | |
- name: Wait mysql server is ready | |
run: node tools/wait-up.js | |
# todo: run full test suite once test createServer is implemented using Bun.listen | |
- name: run tests | |
env: | |
MYSQL_USER: ${{ env.MYSQL_USER }} | |
MYSQL_DATABASE: ${{ env.MYSQL_DATABASE }} | |
MYSQL_PORT: ${{ env.MYSQL_PORT }} | |
MYSQL_USE_COMPRESSION: ${{ matrix.use-compression }} | |
MYSQL_USE_TLS: ${{ matrix.use-tls }} | |
run: | | |
bun test/integration/connection/test-select-1.js | |
bun test/integration/connection/test-select-ssl.js |