-
-
Notifications
You must be signed in to change notification settings - Fork 622
79 lines (66 loc) · 2.34 KB
/
ci-bun.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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