Add to database endpoint #2310
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
# testing locally with act cli | |
# act -W .github/workflows/ci.yml --container-architecture linux/amd64 -env ACTIONS_RUNTIME_URL=http://host.docker.internal:8080/ --env ACTIONS_RUNTIME_TOKEN=foo --env ACTIONS_CACHE_URL=http://host.docker.internal:8080/ --artifact-server-path out -j build-ubuntu -P ubuntu-latest=-self-hosted --env-file .env --secret-file .secrets | |
name: Rust CI | |
on: | |
push: | |
pull_request: | |
jobs: | |
test-ubuntu: | |
runs-on: ubuntu-latest | |
env: | |
RUSTFLAGS: "-C link-arg=-Wl,--allow-multiple-definition" | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/bin/ | |
~/.cargo/registry/index/ | |
~/.cargo/registry/cache/ | |
~/.cargo/git/db/ | |
target/ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: Install dependencies | |
run: .github/scripts/install_dependencies.sh | |
- name: Copy test image | |
run: | | |
mkdir -p target/debug/deps | |
cp screenpipe-vision/tests/testing_OCR.png target/debug/deps/ | |
- name: Run cargo tests | |
run: cargo test | |
- name: Run deno tests | |
env: | |
SCREENPIPE_DIR: ${{ runner.workspace }}/screenpipe | |
PIPE_ID: test | |
PIPE_FILE: pipe.ts | |
PIPE_DIR: ${{ runner.workspace }}/screenpipe/pipes/test | |
run: deno test --allow-env --allow-write --allow-read | |
working-directory: ./screenpipe-js | |
test-windows: | |
runs-on: windows-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~\AppData\Local\cargo\ | |
target\ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Run pre_build.js on | |
shell: bash | |
run: bun ./scripts/pre_build.js | |
working-directory: ./screenpipe-app-tauri | |
- name: Copy test image | |
shell: bash | |
run: | | |
mkdir -p target/debug/deps || true | |
cp screenpipe-vision/tests/testing_OCR.png target/debug/deps/ | |
- name: Run specific Windows OCR cargo test | |
run: cargo test test_process_ocr_task_windows | |
- name: Run deno tests | |
env: | |
SCREENPIPE_DIR: ${{ runner.workspace }}/screenpipe | |
PIPE_ID: test | |
PIPE_FILE: pipe.ts | |
PIPE_DIR: ${{ runner.workspace }}/screenpipe/pipes/test | |
run: deno test --allow-env --allow-write --allow-read | |
working-directory: ./screenpipe-js | |
test-macos: | |
runs-on: macos-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions/cache@v3 | |
with: | |
path: | | |
~\AppData\Local\cargo\ | |
target\ | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
- uses: denoland/setup-deno@v2 | |
with: | |
deno-version: v2.x | |
- name: setup Bun | |
uses: oven-sh/setup-bun@v1 | |
- name: Run pre_build.js on | |
shell: bash | |
env: | |
SKIP_SCREENPIPE_SETUP: true # avoid trying to copy screenpipe binaries, not yet built (next step) | |
run: bun ./scripts/pre_build.js | |
working-directory: ./screenpipe-app-tauri | |
- name: Copy test image | |
shell: bash | |
run: | | |
mkdir -p target/debug/deps || true | |
cp screenpipe-vision/tests/testing_OCR.png target/debug/deps/ | |
- name: Run specific Apple OCR cargo test | |
shell: bash | |
env: | |
DYLD_LIBRARY_PATH: /Users/runner/work/screenpipe/screenpipe/screenpipe-vision/lib | |
run: cargo test test_apple_native_ocr | |
- name: Run deno tests | |
env: | |
SCREENPIPE_DIR: ${{ runner.workspace }}/screenpipe | |
PIPE_ID: test | |
PIPE_FILE: pipe.ts | |
PIPE_DIR: ${{ runner.workspace }}/screenpipe/pipes/test | |
run: deno test --allow-env --allow-write --allow-read | |
working-directory: ./screenpipe-js |