-
Notifications
You must be signed in to change notification settings - Fork 11
62 lines (54 loc) · 1.76 KB
/
tests.yml
File metadata and controls
62 lines (54 loc) · 1.76 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
on:
push:
pull_request:
name: "tests"
jobs:
build:
name: Testing on ${{ matrix.os }}
if: github.event_name == 'push' || (github.event_name == 'pull_request' && github.event.pull_request.head.repo.full_name != github.repository)
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
include:
- os: ubuntu-24.04
- os: macos-latest
steps:
- uses: actions/checkout@v3
with:
submodules: true
- uses: dart-lang/setup-dart@v1
- name: Ubuntu setup
if: matrix.os == 'ubuntu-24.04'
run: |
sudo apt install libreadline-dev
- name: Install Rust Nightly
uses: dtolnay/rust-toolchain@stable
with:
toolchain: nightly-2024-05-18
components: rust-src
- name: Build
run: |
# Need a debug build for the dart tests
cargo build -p powersync_loadable
cargo build -p powersync_loadable --release
cargo build -p powersync_core --release --features static
cargo build -p powersync_sqlite --release
cargo build -p sqlite3 --release
- name: Test powersync
run: |
cargo test -p powersync_core --features loadable_extension
- name: Check shell
run: |
./target/release/powersync_sqlite ":memory:" "select powersync_rs_version()"
- name: Check loadable extension
run: |
./target/release/sqlite3 ":memory:" ".load ./target/release/libpowersync" "select powersync_rs_version()"
- name: Run dart-based tests
# Extension loading fails on macos currently
if: matrix.os == 'ubuntu-24.04'
run: |
cd dart
dart pub get
dart test
dart analyze