summaryrefslogtreecommitdiff
path: root/.github/workflows/book.yml
diff options
context:
space:
mode:
Diffstat (limited to '.github/workflows/book.yml')
-rw-r--r--.github/workflows/book.yml29
1 files changed, 29 insertions, 0 deletions
diff --git a/.github/workflows/book.yml b/.github/workflows/book.yml
new file mode 100644
index 00000000..895a68db
--- /dev/null
+++ b/.github/workflows/book.yml
@@ -0,0 +1,29 @@
+name: CI
+on:
+ pull_request:
+
+jobs:
+ test:
+ name: Test candle-book
+ runs-on: ubuntu-latest
+ permissions:
+ contents: write # To push a branch
+ pull-requests: write # To create a PR from that branch
+ steps:
+ - uses: actions/checkout@master
+ - name: Install Rust
+ run: |
+ rustup set profile minimal
+ rustup toolchain install stable
+ rustup default stable
+ - name: Install latest mdbook
+ run: |
+ tag=$(curl 'https://api.github.com/repos/rust-lang/mdbook/releases/latest' | jq -r '.tag_name')
+ url="https://github.com/rust-lang/mdbook/releases/download/${tag}/mdbook-${tag}-x86_64-unknown-linux-gnu.tar.gz"
+ mkdir bin
+ curl -sSL $url | tar -xz --directory=bin
+ echo "$(pwd)/bin" >> $GITHUB_PATH
+ - name: Run tests
+ run: cd candle-book && mdbook test
+
+