Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
60 changes: 60 additions & 0 deletions .github/workflows/rust-ci-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,60 @@
rname: Rust CI Tests

on:
pull_request:
paths:
- "contracts/**"
- "Cargo.toml"
- "Cargo.lock"
- "rust-toolchain.toml"
push:
branches:
- main
- master

env:
CARGO_TERM_COLOR: always

jobs:
test:
name: Rust Compilation Check
runs-on: ubuntu-latest
timeout-minutes: 15

steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable
with:
targets: wasm32-unknown-unknown
components: rustfmt, clippy

- name: Cache cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-test-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-test-
${{ runner.os }}-cargo-

- name: Check compilation (abundance-token)
run: cargo check --package abundance-token
working-directory: contracts

- name: Check compilation (crowdfund)
run: cargo check --package soroban-crowdfund-contract
working-directory: contracts

- name: Check compilation (mock-token)
run: cargo check --package mock-token
working-directory: contracts

- name: Check all workspace packages compile
run: cargo check --workspace
working-directory: contracts
1 change: 1 addition & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -17,3 +17,4 @@ lto = true
[workspace.dependencies]
soroban-sdk = "20.0.0-rc2"
soroban-token-sdk = "20.0.0-rc2"

Loading