Fix pet serialization (closes #17) #70
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
on: push | |
name: Compile + Test + Update docs | |
jobs: | |
push: | |
name: Compile + Test + Update docs | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout sources | |
uses: actions/checkout@v2 | |
- name: Cache toolchain | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.rustup/toolchains | |
~/.rustup/update-hashes | |
~/.rustup/settings.toml | |
key: toolchain-${{ hashFiles('rust-toolchain') }} | |
- name: Cache dependencies | |
uses: actions/cache@v2 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
key: deps-${{ hashFiles('**/Cargo.lock') }} | |
- name: Cache build | |
uses: actions/cache@v2 | |
with: | |
path: | | |
target/.rustc_info.json | |
target/debug | |
key: target-debug-${{ github.run_number }} | |
restore-keys: | | |
target-debug- | |
- name: Install rustfmt | |
uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
components: rustfmt | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --check | |
- name: Compile | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --no-run | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Cache docs | |
uses: actions/cache@v2 | |
with: | |
path: | | |
target/doc | |
key: target-doc-${{ github.run_number }} | |
restore-keys: | | |
target-doc- | |
- name: Generate documentation | |
uses: actions-rs/cargo@v1 | |
with: | |
command: doc | |
args: --no-deps | |
- name: Create .nojekyll file | |
run: touch target/doc/.nojekyll | |
- name: Deploy to GitHub Pages | |
uses: JamesIves/github-pages-deploy-action@releases/v3 | |
with: | |
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} | |
BRANCH: gh-pages | |
FOLDER: target/doc | |
SINGLE_COMMIT: true |