Skip to content

Run prettier in all files #208

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 2 commits into from
May 21, 2024
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
284 changes: 142 additions & 142 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,164 +1,164 @@
name: "CI"
on:
push:
branches: ["main"]
pull_request:
push:
branches: ["main"]
pull_request:

jobs:
"wasm-test":
name: "Build and test Wasm on Node.js"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client-wasm
env: {"NODE_OPTIONS": "--trace-warnings"}
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "npm"
cache-dependency-path: "packages/libsql-client-wasm"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Install npm dependencies"
run: "npm ci"
- name: "Build"
run: "npm run build"
- name: "Test example"
run: "cd examples/node && npm i && node index.js"
env: {"URL": "file:///tmp/example.db"}
"wasm-test":
name: "Build and test Wasm on Node.js"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client-wasm
env: { "NODE_OPTIONS": "--trace-warnings" }
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "npm"
cache-dependency-path: "packages/libsql-client-wasm"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Install npm dependencies"
run: "npm ci"
- name: "Build"
run: "npm run build"
- name: "Test example"
run: "cd examples/node && npm i && node index.js"
env: { "URL": "file:///tmp/example.db" }

"node-test":
name: "Build and test on Node.js"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client
env: {"NODE_OPTIONS": "--trace-warnings"}
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "npm"
cache-dependency-path: "packages/libsql-client"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Install npm dependencies"
run: "npm ci"
- name: "Checkout hrana-test-server"
uses: actions/checkout@v3
with:
repository: "libsql/hrana-test-server"
path: "packages/libsql-client/hrana-test-server"
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: "Install pip dependencies"
run: "pip install -r hrana-test-server/requirements.txt"
"node-test":
name: "Build and test on Node.js"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client
env: { "NODE_OPTIONS": "--trace-warnings" }
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "18.x"
cache: "npm"
cache-dependency-path: "packages/libsql-client"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Install npm dependencies"
run: "npm ci"
- name: "Checkout hrana-test-server"
uses: actions/checkout@v3
with:
repository: "libsql/hrana-test-server"
path: "packages/libsql-client/hrana-test-server"
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: "Install pip dependencies"
run: "pip install -r hrana-test-server/requirements.txt"

- name: "Build"
run: "npm run build"
- name: "Build"
run: "npm run build"

- name: "Test Hrana 1 over WebSocket"
run: "python hrana-test-server/server_v1.py npm test"
env: {"URL": "ws://localhost:8080", "SERVER": "test_v1"}
- name: "Test Hrana 2 over WebSocket"
run: "python hrana-test-server/server_v2.py npm test"
env: {"URL": "ws://localhost:8080", "SERVER": "test_v2"}
- name: "Test Hrana 2 over HTTP"
run: "python hrana-test-server/server_v2.py npm test"
env: {"URL": "http://localhost:8080", "SERVER": "test_v2"}
# - name: "Test Hrana 3 over WebSocket"
# run: "python hrana-test-server/server_v3.py npm test"
# env: {"URL": "ws://localhost:8080", "SERVER": "test_v3"}
# - name: "Test Hrana 3 over HTTP"
# run: "python hrana-test-server/server_v3.py npm test"
# env: {"URL": "http://localhost:8080", "SERVER": "test_v3"}
- name: "Test local file"
run: "npm test"
env: {"URL": "file:///tmp/test.db"}
- name: "Test Hrana 1 over WebSocket"
run: "python hrana-test-server/server_v1.py npm test"
env: { "URL": "ws://localhost:8080", "SERVER": "test_v1" }
- name: "Test Hrana 2 over WebSocket"
run: "python hrana-test-server/server_v2.py npm test"
env: { "URL": "ws://localhost:8080", "SERVER": "test_v2" }
- name: "Test Hrana 2 over HTTP"
run: "python hrana-test-server/server_v2.py npm test"
env: { "URL": "http://localhost:8080", "SERVER": "test_v2" }
# - name: "Test Hrana 3 over WebSocket"
# run: "python hrana-test-server/server_v3.py npm test"
# env: {"URL": "ws://localhost:8080", "SERVER": "test_v3"}
# - name: "Test Hrana 3 over HTTP"
# run: "python hrana-test-server/server_v3.py npm test"
# env: {"URL": "http://localhost:8080", "SERVER": "test_v3"}
- name: "Test local file"
run: "npm test"
env: { "URL": "file:///tmp/test.db" }

- name: "Test example"
run: "cd examples && npm i && node example.js"
env: {"URL": "file:///tmp/example.db"}
- name: "Test example"
run: "cd examples && npm i && node example.js"
env: { "URL": "file:///tmp/example.db" }

"workers-test":
name: "Build and test with Cloudflare Workers"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client
env:
"CLOUDFLARE_API_TOKEN": "${{ secrets.CLOUDFLARE_API_TOKEN }}"
"CLOUDFLARE_ACCOUNT_ID": "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}"
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "lts/Hydrogen"
cache: "npm"
cache-dependency-path: "packages/libsql-client"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Install npm dependencies"
run: "npm ci"
"workers-test":
name: "Build and test with Cloudflare Workers"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client
env:
"CLOUDFLARE_API_TOKEN": "${{ secrets.CLOUDFLARE_API_TOKEN }}"
"CLOUDFLARE_ACCOUNT_ID": "${{ secrets.CLOUDFLARE_ACCOUNT_ID }}"
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "lts/Hydrogen"
cache: "npm"
cache-dependency-path: "packages/libsql-client"
- name: "Build core"
run: "npm ci && npm run build"
working-directory: ./packages/libsql-core
- name: "Install npm dependencies"
run: "npm ci"

- name: "Checkout hrana-test-server"
uses: actions/checkout@v3
with:
repository: "libsql/hrana-test-server"
path: "packages/libsql-client/hrana-test-server"
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: "Install pip dependencies"
run: "pip install -r hrana-test-server/requirements.txt"
- name: "Checkout hrana-test-server"
uses: actions/checkout@v3
with:
repository: "libsql/hrana-test-server"
path: "packages/libsql-client/hrana-test-server"
- name: "Setup Python"
uses: actions/setup-python@v4
with:
python-version: "3.10"
cache: "pip"
- name: "Install pip dependencies"
run: "pip install -r hrana-test-server/requirements.txt"

- name: "Build"
run: "npm run build"
- name: "Install npm dependencies of the Workers test"
run: "cd smoke_test/workers && npm link ../.."
- name: "Build"
run: "npm run build"
- name: "Install npm dependencies of the Workers test"
run: "cd smoke_test/workers && npm link ../.."

- name: "Local test with Hrana 1 over WebSocket"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node --dns-result-order=ipv4first test.js"
env: {"LOCAL": "1", "URL": "ws://localhost:8080"}
- name: "Local test with Hrana 2 over WebSocket"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js"
env: {"LOCAL": "1", "URL": "ws://localhost:8080"}
- name: "Local test with Hrana 2 over HTTP"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js"
env: {"LOCAL": "1", "URL": "http://localhost:8080"}
- name: "Local test with Hrana 1 over WebSocket"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node --dns-result-order=ipv4first test.js"
env: { "LOCAL": "1", "URL": "ws://localhost:8080" }
- name: "Local test with Hrana 2 over WebSocket"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js"
env: { "LOCAL": "1", "URL": "ws://localhost:8080" }
- name: "Local test with Hrana 2 over HTTP"
run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node --dns-result-order=ipv4first test.js"
env: { "LOCAL": "1", "URL": "http://localhost:8080" }
# - name: "Local test with Hrana 3 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node --dns-result-order=ipv4first test.js"
# env: {"LOCAL": "1", "URL": "ws://localhost:8080"}
# - name: "Local test with Hrana 3 over HTTP"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node --dns-result-order=ipv4first test.js"
# env: {"LOCAL": "1", "URL": "http://localhost:8080"}

# - name: "Non-local test with Hrana 1 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node test.js"
# env: {"LOCAL": "0", "URL": "ws://localhost:8080"}
# - name: "Non-local test with Hrana 2 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js"
# env: {"LOCAL": "0", "URL": "ws://localhost:8080"}
# - name: "Non-local test with Hrana 2 over HTTP"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js"
# env: {"LOCAL": "0", "URL": "http://localhost:8080"}
# - name: "Non-local test with Hrana 1 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v1.py node test.js"
# env: {"LOCAL": "0", "URL": "ws://localhost:8080"}
# - name: "Non-local test with Hrana 2 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js"
# env: {"LOCAL": "0", "URL": "ws://localhost:8080"}
# - name: "Non-local test with Hrana 2 over HTTP"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v2.py node test.js"
# env: {"LOCAL": "0", "URL": "http://localhost:8080"}
# - name: "Non-local test with Hrana 3 over WebSocket"
# run: "cd smoke_test/workers && python ../../hrana-test-server/server_v3.py node test.js"
# env: {"LOCAL": "0", "URL": "ws://localhost:8080"}
Expand Down
78 changes: 38 additions & 40 deletions .github/workflows/pages.yaml
Original file line number Diff line number Diff line change
@@ -1,47 +1,45 @@
name: "GitHub Pages"
on:
push:
branches: ["main"]
push:
branches: ["main"]

jobs:
"build":
name: "Build the docs"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "${{ matrix.node-version }}"
cache: "npm"
- name: "Install npm dependencies"
run: "npm ci"
- name: "Build"
run: "npm run typedoc"
- name: "Upload GitHub Pages artifact"
uses: actions/upload-pages-artifact@v1
with:
path: "./docs"
"build":
name: "Build the docs"
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./packages/libsql-client
steps:
- name: "Checkout this repo"
uses: actions/checkout@v3
- name: "Setup Node.js"
uses: actions/setup-node@v3
with:
node-version: "${{ matrix.node-version }}"
cache: "npm"
- name: "Install npm dependencies"
run: "npm ci"
- name: "Build"
run: "npm run typedoc"
- name: "Upload GitHub Pages artifact"
uses: actions/upload-pages-artifact@v1
with:
path: "./docs"

"deploy":
name: "Deploy the docs to GitHub Pages"
needs: "build"
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: "Deploy to GitHub Pages"
id: deployment
uses: actions/deploy-pages@v1
"deploy":
name: "Deploy the docs to GitHub Pages"
needs: "build"
permissions:
pages: write
id-token: write

environment:
name: github-pages
url: ${{ steps.deployment.outputs.page_url }}

runs-on: ubuntu-latest
steps:
- name: "Deploy to GitHub Pages"
id: deployment
uses: actions/deploy-pages@v1
Loading
Loading