[WIP] Examples Testing #2
Workflow file for this run
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: Docs Code Test | |
on: | |
push: | |
branches: | |
- main | |
paths: | |
- examples/** | |
- .github/workflows/docs-test.yml | |
- compile_testing.py | |
- compile_testing.js | |
pull_request: | |
paths: | |
- examples/** | |
- .github/workflows/docs-test.yml | |
- compile_testing.py | |
- compile_testing.js | |
workflow_dispatch: | |
jobs: | |
test-python: | |
name: Test python examples | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
python-version: [ "11" ] | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/setup-python@v4 | |
with: | |
python-version: 3.${{ matrix.python-version }} | |
cache: "pip" | |
cache-dependency-path: "requirements.txt" | |
- name: Create files | |
run: | | |
python -m pip install --upgrade pip | |
python compile_testing.py | |
- name: Install dependencies | |
run: | | |
sudo apt-get install unzip | |
pip install -r joined-requirements.txt | |
- name: Download datasets | |
run: | | |
cd testing-folder | |
bash commands.sh | |
- name: Run tests | |
run: | | |
cd testing-folder | |
for d in *; do | |
echo "$d".py; | |
python "$d".py; | |
cd ..; | |
done | |
env: | |
credentials: ${{ secrets.OPENAI_API_KEY }} | |
test-node: | |
name: Test node examples | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
node-version: [ "18" ] | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
fetch-depth: 0 | |
lfs: true | |
- uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node-version }} | |
- name: Install dependencies | |
run: | | |
sudo apt update | |
sudo apt install -y protobuf-compiler libssl-dev | |
npm install -g package-json-merge | |
- name: Create files | |
run: | | |
node compile_testing.js | |
cd testing-folder | |
cat merge-package.sh | |
bash merge-package.sh | |
npm install | |
- uses: swatinem/rust-cache@v2 | |
- name: Install LanceDB | |
run: | | |
cd testing-folder/node_modules/vectordb | |
npm ci | |
npm run build-release | |
npm run tsc | |
- name: Download datasets | |
run: | | |
cd testing-folder | |
bash commands.sh | |
- name: Run tests | |
run: | | |
cd testing-folder | |
for d in *; do | |
echo "$d".js; | |
node "$d".js; | |
cd ..; | |
done | |
env: | |
credentials: ${{ secrets.OPENAI_API_KEY }} |