@@ -90,14 +90,78 @@ jobs:
9090 with :
9191 command : run
9292 args : --bin sqllogictest-test --manifest-path ./tests/sqllogictest/Cargo.toml
93- # codecov:
94- # name: Upload coverage reports to Codecov
95- # runs-on: ubuntu-latest
96- # steps:
97- # - name: Upload coverage reports to Codecov
98- # uses: codecov/codecov-action@v3
99- # with:
100- # files: ./lcov.info
101- # flags: rust
102- # env:
103- # CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
93+ # 4
94+ wasm-tests :
95+ name : Wasm cargo tests
96+ runs-on : ubuntu-latest
97+ steps :
98+ - uses : actions/checkout@v2
99+
100+ - name : Install stable with wasm target
101+ uses : actions-rs/toolchain@v1
102+ with :
103+ toolchain : stable
104+ target : wasm32-unknown-unknown
105+ override : true
106+
107+ - name : Setup Node.js
108+ uses : actions/setup-node@v4
109+ with :
110+ node-version : 20
111+
112+ - name : Install wasm-pack
113+ uses : jetli/wasm-pack-action@v0.4.0
114+ with :
115+ version : latest
116+
117+ - name : Run wasm-bindgen tests (wasm32 target)
118+ run : wasm-pack test --node -- --package kite_sql --lib
119+ # 5
120+ wasm-examples :
121+ name : Wasm examples (nodejs)
122+ runs-on : ubuntu-latest
123+ steps :
124+ - uses : actions/checkout@v2
125+
126+ - name : Install stable with wasm target
127+ uses : actions-rs/toolchain@v1
128+ with :
129+ toolchain : stable
130+ target : wasm32-unknown-unknown
131+ override : true
132+
133+ - name : Setup Node.js
134+ uses : actions/setup-node@v4
135+ with :
136+ node-version : 20
137+
138+ - name : Install wasm-pack
139+ uses : jetli/wasm-pack-action@v0.4.0
140+ with :
141+ version : latest
142+
143+ - name : Build wasm package
144+ run : wasm-pack build --release --target nodejs
145+
146+ - name : Run wasm example scripts
147+ run : |
148+ node examples/wasm_hello_world.test.mjs
149+ node examples/wasm_index_usage.test.mjs
150+ # 6
151+ native-examples :
152+ name : Native examples
153+ runs-on : ubuntu-latest
154+ steps :
155+ - uses : actions/checkout@v2
156+
157+ - name : Install stable toolchain
158+ uses : actions-rs/toolchain@v1
159+ with :
160+ toolchain : stable
161+ override : true
162+
163+ - name : Run hello_world example
164+ run : cargo run --example hello_world
165+
166+ - name : Run transaction example
167+ run : cargo run --example transaction
0 commit comments