Skip to content

Commit

Permalink
gh-actions: Add initial CI workflow to cover basic linting checks and…
Browse files Browse the repository at this point in the history
… unit testing. (#1)
  • Loading branch information
LinZhihao-723 authored Oct 14, 2024
1 parent 383a467 commit 110096f
Showing 1 changed file with 40 additions and 0 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
name: "CI"

on:
push:
pull_request:
workflow_dispatch:

concurrency:
group: "${{github.workflow}}-${{github.ref}}"
# Cancel in-progress jobs for efficiency
cancel-in-progress: true

jobs:
build:
strategy:
matrix:
os: ["macos-latest", "ubuntu-latest"]
runs-on: "${{matrix.os}}"
steps:
- uses: "actions/checkout@v4"

- name: "Install Rust toolchain"
run: rustup show

- name: "Install Rust fmt toolchain"
run: rustup component add rustfmt

- name: "Install cargo nextest"
uses: taiki-e/install-action@v2
with:
tool: cargo-nextest

- name: "Cargo fmt"
run: cargo fmt --all --check

- name: "Cargo check"
run: cargo check

- name: "Cargo test"
run: cargo nextest run --all-features

0 comments on commit 110096f

Please sign in to comment.