Skip to content

chore: upgrade pyo3 to 0.23 (#188) #638

chore: upgrade pyo3 to 0.23 (#188)

chore: upgrade pyo3 to 0.23 (#188) #638

Workflow file for this run

name: Rust
on:
push:
branches: ["main"]
pull_request:
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
- name: Run cargo check
run: cargo check --all-targets --all-features
wasmstan:
name: Prophet WASMStan component
uses: grafana/augurs/.github/workflows/wasmstan.yml@main
test:
name: Tests
runs-on: ubuntu-latest
needs: wasmstan
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
bins: cargo-nextest,just
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Download the Prophet wasmstan module since an example and some doctests require it.
- name: Download Prophet WASMStan component artifact
uses: actions/download-artifact@v4
with:
name: prophet-wasmstan.wasm
path: crates/augurs-prophet
# Download the Prophet Stan model since an example requires it.
- name: Download Prophet Stan model
run: just download-prophet-stan-model
- name: Run cargo nextest
run: just test-all
# Run book tests before doc tests because otherwise there are multiple
# 'augurs' rlibs that the book could use as its augurs dependency.
- name: Run doc tests
run: just doctest
test-book:
name: Test Book
runs-on: ubuntu-latest
needs: wasmstan
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
bins: cargo-nextest,just,mdbook
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
# Download the Prophet wasmstan module since an example and some doctests require it.
- name: Download Prophet WASMStan component artifact
uses: actions/download-artifact@v4
with:
name: prophet-wasmstan.wasm
path: crates/augurs-prophet
# The book tests require the augurs library to be built. In CI, we cache the result
# of the build so that we don't have to rebuild it every time, but this can result
# in multiple 'augurs' rlibs being present in the book's target directory. This
# causes the book tests to fail because they don't know which to link against.
# Remove the old cached augurs libraries before rebuilding so that there is
# only one augurs library present.
- name: Remove old cached augurs libraries
run: rm -rf target/debug/deps/libaugurs*
- name: Run cargo build
run: cargo build
- name: Run book tests
run: just book/test
fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: rustfmt
- name: Run cargo fmt
run: cargo fmt --all -- --check
clippy:
name: Clippy
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: clippy
- name: Run cargo clippy
run: cargo clippy --all-features --all-targets -- -D warnings