2022-12-22 16:09:57 +02:00
|
|
|
name: Build and Test
|
|
|
|
|
|
|
|
on:
|
|
|
|
pull_request:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- main
|
|
|
|
|
2023-01-03 15:39:24 +02:00
|
|
|
env:
|
|
|
|
CARGO_TERM_COLOR: always
|
|
|
|
|
2022-12-22 16:09:57 +02:00
|
|
|
jobs:
|
2023-01-03 15:39:24 +02:00
|
|
|
mdbook:
|
2022-12-22 16:09:57 +02:00
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup Rust cache
|
|
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
|
|
|
|
- name: Install mdbook
|
2022-12-23 13:42:55 +02:00
|
|
|
run: cargo install mdbook --version 0.4.25
|
2022-12-22 16:09:57 +02:00
|
|
|
|
|
|
|
- name: Install mdbook-svgbob
|
2022-12-23 13:42:55 +02:00
|
|
|
run: cargo install mdbook-svgbob --version 0.2.1
|
2022-12-22 16:09:57 +02:00
|
|
|
|
|
|
|
- name: Test code snippets
|
|
|
|
run: mdbook test
|
2023-01-03 15:39:24 +02:00
|
|
|
|
|
|
|
cargo:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- name: Checkout
|
|
|
|
uses: actions/checkout@v3
|
|
|
|
|
|
|
|
- name: Setup Rust cache
|
|
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
|
|
|
|
- name: Test Rust code
|
|
|
|
run: cargo test
|