Skip to content

Github Actions

Github Actions #7

Workflow file for this run

name: SDK Rust CI
on:
push:
branches:
- main
pull_request:
branches:
- '*'
env:
CARGO_TERM_COLOR: always
jobs:
# test:
# name: cargo test
# strategy:
# matrix:
# os: [ ubuntu-latest, macos-latest, windows-latest ]
# rust: [stable, nightly]
# runs-on: ${{ matrix.os }}
# steps:
# - uses: actions/checkout@v4
# - name: Set up Rust
# uses: actions-rust-lang/setup-rust-toolchain@v1
# with:
# toolchain: ${{ matrix.rust }}
# - name: Test
# run: cargo test --workspace
format:
name: cargo fmt
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
steps:
- uses: actions/checkout@v4
- name: Setup Rustfmt
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
toolchain: stable
components: rustfmt
- name: Rustfmt Check
uses: actions-rust-lang/rustfmt@v1
- name: Comment Failure Summary (if needed)
if: failure() && github.event_name == 'pull_request'
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: $GITHUB_STEP_SUMMARY
});