Skip to content

Commit 46de219

Browse files
committed
Run cargo and mdbook tests on build
1 parent a2cc921 commit 46de219

File tree

2 files changed

+16
-1
lines changed

2 files changed

+16
-1
lines changed

.github/workflows/build.yml

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ on:
77

88
jobs:
99
build:
10-
name: Build
10+
name: Build and Test
1111
runs-on: ubuntu-latest
1212
strategy:
1313
matrix:
@@ -37,13 +37,27 @@ jobs:
3737
with:
3838
version: ${{ matrix.llvm }}
3939
directory: ${{ runner.temp }}/llvm-${{ matrix.llvm }}
40+
- name: Install mdbook
41+
uses: peaceiris/actions-mdbook@v1
42+
with:
43+
mdbook-version: latest
4044
- name: Build
4145
uses: actions-rs/cargo@v1
4246
env:
4347
LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
4448
with:
4549
command: build
4650
args: --release
51+
- name: Test guide examples
52+
run: |
53+
mdbook test guide -L target/release/deps
54+
- name: Test inline examples
55+
uses: actions-rs/cargo@v1
56+
env:
57+
LIBCLANG_PATH: ${{ runner.temp }}/llvm-${{ matrix.llvm }}/lib
58+
with:
59+
command: test
60+
args: --release
4761
build-zts:
4862
name: Build with ZTS
4963
runs-on: ubuntu-latest

src/php/module.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,7 @@ pub type InfoFunc = extern "C" fn(zend_module: *mut ModuleEntry);
4242
/// ModuleBuilder::new("ext-name", "ext-version")
4343
/// .info_function(php_module_info)
4444
/// .build()
45+
/// .unwrap()
4546
/// .into_raw()
4647
/// }
4748
/// ```

0 commit comments

Comments
 (0)