test: Fix testing documentation examples of fieldx_derive
crate
#115
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
name: CI | |
on: | |
push: | |
pull_request: | |
env: | |
CARGO_TERM_COLOR: always | |
CARGO_INCREMENTAL: 0 | |
jobs: | |
with_features: | |
runs-on: ${{ matrix.os }}-latest | |
timeout-minutes: 30 | |
strategy: | |
matrix: | |
os: [ubuntu, macos, windows] | |
toolchain: | |
- 1.77 | |
- stable | |
- beta | |
- nightly | |
feature: [serde, send_guard] | |
exclude: | |
- os: windows | |
toolchain: nightly | |
env: | |
__FIELDX_DEFAULT_TOOLCHAIN__: ${{ matrix.toolchain }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show environment variables | |
run: env | |
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- run: cargo build --verbose --all --features sync,async,${{ matrix.feature }} | |
- run: cargo test --verbose --all --features sync,async,${{ matrix.feature }} | |
- run: cargo test --verbose --all --features serde,send_guard | |
if: matrix.feature == 'serde' | |
all_features: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu, macos, windows] | |
toolchain: | |
- 1.77 | |
- stable | |
- beta | |
- nightly | |
env: | |
__FIELDX_DEFAULT_TOOLCHAIN__: ${{ matrix.toolchain }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show environment variables | |
run: env | |
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- run: cargo build --verbose --all --features sync,async,serde,send_guard | |
- run: cargo test --verbose --all --features sync,async,serde,send_guard | |
- run: cargo test --verbose --all --features sync,async,serde | |
no_features: | |
runs-on: ${{ matrix.os }}-latest | |
strategy: | |
matrix: | |
os: [ubuntu, macos, windows] | |
toolchain: | |
- 1.77 | |
- stable | |
- beta | |
- nightly | |
env: | |
__FIELDX_DEFAULT_TOOLCHAIN__: ${{ matrix.toolchain }} | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Show environment variables | |
run: env | |
- run: rustup update ${{ matrix.toolchain }} && rustup default ${{ matrix.toolchain }} | |
- run: cargo build --verbose --all | |
- name: Test all | |
env: | |
__FIELDX_DEFAULT_TOOLCHAIN__: ${{ matrix.toolchain }} | |
run: cargo test --verbose --all | |
build_docs: | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- run: rustup default nightly | |
- run: cargo install cargo-docs-rs | |
- run: cargo docs-rs -p fieldx | |