-
Notifications
You must be signed in to change notification settings - Fork 3
56 lines (51 loc) · 1.54 KB
/
build.yml
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
on:
push:
branches:
- main
pull_request:
branches:
- main
name: Continuous integration
jobs:
test:
name: Test workspace
strategy:
matrix:
workspace: [core, pkg, cli]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- if: ${{ matrix.workspace == 'core' }}
run: cargo test --manifest-path pg-${{ matrix.workspace }}/Cargo.toml --features test,rust,stream
- if: ${{ matrix.workspace != 'core' }}
run: cargo test --manifest-path pg-${{ matrix.workspace }}/Cargo.toml --all-features
format:
name: Format workspace
strategy:
matrix:
workspace: [core, pkg, cli]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo fmt --manifest-path pg-${{ matrix.workspace }}/Cargo.toml --all -- --check
test-wasm-browsers:
name: Run wasm tests in browsers
strategy:
matrix:
browser: [chrome, firefox]
os: [ubuntu-latest]
include:
- browser: safari
os: macos-latest
runs-on: ${{ matrix.os }}
env:
WASM_BINDGEN_TEST_TIMEOUT: 120
steps:
- uses: actions/checkout@v2
- name: Install
run: curl https://rustwasm.github.io/wasm-pack/installer/init.sh -sSf | sh
- if: ${{ matrix.browser == 'firefox' }}
run: sudo apt update && sudo apt install firefox
- run: wasm-pack test --release --headless --${{ matrix.browser }} ./pg-wasm