Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion .github/workflows/ci-coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,7 +58,7 @@ jobs:
run: node tools/wait-up.js

- name: Run tests
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run coverage-test
run: FILTER=${{matrix.filter}} MYSQL_USE_TLS=${{ matrix.use-tls }} MYSQL_USE_COMPRESSION=${{ matrix.use-compression }} npm run test:coverage

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
Expand Down
58 changes: 0 additions & 58 deletions .github/workflows/ci-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,64 +116,6 @@ jobs:
run: bun run test:bun
timeout-minutes: 10

tests-linux-deno-v1:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
deno-version: [v1.x]
mysql-version: ['mysql:8.3']
use-compression: [0, 1]
static-parser: [0, 1]
# TODO: investigate error when using SSL (1)
#
# errno: -4094
# code: "UNKNOWN"
# syscall: "read"
use-tls: [0]

env:
STATIC_PARSER: ${{ matrix.static-parser }}

name: Deno ${{ matrix.deno-version }} - DB ${{ matrix.mysql-version }} - SSL=${{matrix.use-tls}} Compression=${{matrix.use-compression}} Static Parser=${{matrix.static-parser}}

steps:
- uses: actions/checkout@v4
- 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/test/fixtures/custom-conf:/etc/mysql/conf.d -v $PWD/test/fixtures/ssl/certs:/certs -p ${{ env.MYSQL_PORT }}:3306 ${{ matrix.mysql-version }}

- name: Set up Deno ${{ matrix.deno-version }}
uses: denoland/setup-deno@v1
with:
deno-version: ${{ matrix.deno-version }}

- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 20
- name: Cache dependencies
uses: actions/cache@v4
with:
path: ~/.npm
key: npm-linux-${{ hashFiles('package-lock.json') }}
restore-keys: npm-linux-

- name: Install npm dependencies
run: npm ci

- name: Wait mysql server is ready
run: node tools/wait-up.js

- 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: deno task test:deno -- --denoCjs='.js,.cjs'
timeout-minutes: 10

tests-linux-deno-v2:
runs-on: ubuntu-latest
strategy:
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/ci-tsc-build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,4 +35,4 @@ jobs:
run: npm ci

- name: Testing TypeScript build
run: npm run test:tsc-build
run: npm run typecheck
2 changes: 1 addition & 1 deletion Contributing.md
Original file line number Diff line number Diff line change
Expand Up @@ -133,7 +133,7 @@ FILTER='timeout' npm test
For testing **coverage**:

```bash
npm run coverage-test
npm run test:coverage
```

#### Docker
Expand Down
3 changes: 3 additions & 0 deletions deno.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,3 @@
{
"unstable": ["sloppy-imports"]
}
31 changes: 29 additions & 2 deletions eslint.config.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,33 @@ export default [
],
},
},
...compat.extends('plugin:@typescript-eslint/recommended').map((config) => ({
...config,
files: ['**/*.mts'],
})),
{
files: ['**/*.mts'],
plugins: {
'@typescript-eslint': typescriptEslint,
},
languageOptions: {
parser: tsParser,
},
rules: {
'@typescript-eslint/no-empty-interface': 'off',
'@typescript-eslint/no-explicit-any': 'off',
'@typescript-eslint/no-empty-object-type': 'off',
strict: 'off',
'no-restricted-syntax': [
'error',
{
selector:
'ImportDeclaration[source.value=/^\\./][source.value!=/\\.(m?js)$/]',
message: 'Local imports must have the explicit .mjs or .js extension',
},
],
},
},
{
files: ['**/*.md'],
processor: 'markdown/markdown',
Expand Down Expand Up @@ -111,14 +138,14 @@ export default [
},
},
{
files: ['**/**/*.test.ts'],
files: ['**/**/*.test.ts', '**/**/*.test.mts'],
rules: {
'@typescript-eslint/no-unused-expressions': 'off',
'arrow-parens': ['error', 'always'],
},
},
{
files: ['**/*.mjs'],
files: ['**/*.mjs', '**/*.mts'],
languageOptions: {
ecmaVersion: 'latest',
sourceType: 'module',
Expand Down
Loading
Loading