From 3339901953e2087b4e0dc2cd9ec857284a5fb48b Mon Sep 17 00:00:00 2001 From: hms5232 Date: Sun, 8 Sep 2024 15:39:53 +0800 Subject: [PATCH] ci: lint and test --- .github/workflows/test.yml | 24 ++++++++++++++++++++++++ 1 file changed, 24 insertions(+) create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..1839d5d --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,24 @@ +name: test.yml +on: + - push + - pull_request + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - name: Run cargo fmt + run: cargo fmt --all -- --check + + unit-test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: Swatinem/rust-cache@v2 + - name: Run cargo test + run: cargo test --verbose