Skip to content

node: Integrate new p2panda high-level API #13

node: Integrate new p2panda high-level API

node: Integrate new p2panda high-level API #13

Workflow file for this run

name: Rust
on: push
env:
CARGO_TERM_COLOR: always
RUST_TOOLCHAIN: 1.94.0
EXCLUDE_PACKAGES: reflection
PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig
jobs:
test:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install glib
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0-dev pkg-config
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Run tests
run: |
cargo test \
--workspace \
--exclude ${{ env.EXCLUDE_PACKAGES }} \
--all-features
check:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install glib
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0-dev pkg-config
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Check project and dependencies
run: |
cargo check \
--workspace \
--exclude ${{ env.EXCLUDE_PACKAGES }} \
--all-features
fmt:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: rustfmt
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Check formatting
# The `config` module gets auto-generated by the build system and is
# otherwise missing, we create an empty file so at least fmt will not
# wonder where that module went.
run: |
echo "" > ${{ github.workspace }}/reflection-app/src/config.rs
cargo fmt -- --check
clippy:
runs-on: ubuntu-latest
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install glib
run: |
sudo apt-get update
sudo apt-get install -y libglib2.0-dev pkg-config
- name: Setup Rust toolchain
uses: moonrepo/setup-rust@v1
with:
components: clippy
channel: ${{ env.RUST_TOOLCHAIN }}
- name: Check code with clippy
run: |
cargo clippy \
--workspace \
--exclude ${{ env.EXCLUDE_PACKAGES }} \
--all-features -- -D warnings --no-deps