chore: bump version #313
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
name: ci | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- "**" | |
jobs: | |
build: | |
name: Lint CLI and run cargotests | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
with: | |
sparse-checkout: | | |
clients/cli | |
proto | |
- name: Set up Rust | |
uses: dtolnay/rust-toolchain@stable | |
- name: Set up Rust cache | |
uses: Swatinem/rust-cache@v2 | |
with: | |
workspaces: ./clients/cli | |
- name: Install Protobuf Compiler | |
run: | | |
sudo apt-get update | |
sudo apt-get install -y protobuf-compiler | |
- name: Format | |
working-directory: clients/cli | |
run: | | |
rustfmt src/**/*.rs --check --edition 2021 | |
- name: Build | |
working-directory: clients/cli | |
run: | | |
cargo build --profile=ci-build | |
- name: Run cargo clippy on /src directory only (not /examples) | |
working-directory: clients/cli | |
run: | | |
cargo clippy --profile=ci-build --no-deps --package nexus-network -- -D warnings | |
- name: Test | |
working-directory: clients/cli | |
run: | | |
cargo test --profile=ci-build --tests | |
- name: Ensure checked in generated files are up to date | |
run: | | |
if [ -n "$(git status --porcelain)" ]; then \ | |
echo "There are uncommitted changes in working tree after building."; \ | |
git status; \ | |
git --no-pager diff; \ | |
exit 1; \ | |
else \ | |
echo "Git working tree is clean"; \ | |
fi; |