-
-
Notifications
You must be signed in to change notification settings - Fork 633
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
3 changed files
with
56 additions
and
1 deletion.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,54 @@ | ||
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: [0.5.1] | ||
mysql-version: ["mysql:5.7", "mysql:8.0.18", "mysql:8.0.22"] | ||
use-compression: [0] | ||
use-tls: [0] | ||
|
||
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/[email protected] | ||
with: | ||
bun-version: ${{ matrix.bun-version }} | ||
|
||
- name: Cache dependencies | ||
uses: actions/cache@v3 | ||
with: | ||
path: ~/.npm | ||
key: npm-${{ hashFiles('package-lock.json') }} | ||
restore-keys: npm- | ||
|
||
- name: Install npm dependencies | ||
run: bun install | ||
- name: Wait mysql server is ready | ||
run: bun tools/wait-up.js | ||
|
||
- name: Run tests | ||
# todo: run full test suite once test createServer is implemented using Bun.listen | ||
run: MYSQL_PORT=3306 MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} bun test/integration/connection/test-select-1.js |
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
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