Skip to content

Commit

Permalink
[ISSUE #9]add github action ci (#10)
Browse files Browse the repository at this point in the history
  • Loading branch information
mxsm authored Nov 6, 2024
1 parent 2601edd commit 7448671
Showing 1 changed file with 46 additions and 0 deletions.
46 changes: 46 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
name: CI
on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main"]
env:
CARGO_TERM_COLOR: always
RUST_BACKTRACE: full
CI: true

jobs:
build:
runs-on: ubuntu-latest

strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
rust: [stable,nightly]

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

- name: Set up Rust
uses: dtolnay/rust-toolchain@stable
with:
override: true
toolchain: ${{ matrix.rust }}

- name: Install dependencies
run: |
rustup component add rustfmt
rustup component add clippy
- name: Format check
run: cargo fmt -- --check

- name: Clippy check
run: cargo clippy -- -D warnings

- name: Build
run: cargo build --verbose

- name: Test
run: cargo test --verbose

0 comments on commit 7448671

Please sign in to comment.