Merge pull request #6 from ottomated/main #18
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" | |
on: | |
push: | |
branches: ["main"] | |
pull_request: | |
jobs: | |
"node-test": | |
name: "Build and test on Node.js" | |
runs-on: ubuntu-latest | |
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" | |
- name: "Install npm dependencies" | |
run: "npm ci" | |
- name: "Checkout hrana-test-server" | |
uses: actions/checkout@v3 | |
with: | |
repository: "libsql/hrana-test-server" | |
path: "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: "Test with Hrana 1 over WebSocket" | |
run: "python hrana-test-server/server_v1.py npm test" | |
env: {"URL": "ws://localhost:8080"} | |
- name: "Test with Hrana 2 over WebSocket" | |
run: "python hrana-test-server/server_v2.py npm test" | |
env: {"URL": "ws://localhost:8080"} | |
- name: "Test with Hrana 2 over HTTP" | |
run: "python hrana-test-server/server_v2.py npm test" | |
env: {"URL": "http://localhost:8080"} | |
- name: "Example" | |
run: "cd example && npm link .. && python ../hrana-test-server/server_v2.py npm run example" |