From 0f7eaa47a1016c951fae8d9dc998f75c426f51eb Mon Sep 17 00:00:00 2001 From: minghuaw Date: Thu, 13 Jun 2024 10:08:27 -0700 Subject: [PATCH] added ci --- .github/workflows/ci.yml | 65 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 65 insertions(+) create mode 100644 .github/workflows/ci.yml diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 00000000..bc269e09 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,65 @@ +name: CI + +on: + push: + branches: + - main + pull_request: {} + +concurrency: + group: ${{ github.workflow }}-${{ github.ref }} + cancel-in-progress: true + +jobs: + rustfmt: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + override: true + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all -- --deny warnings + + # run tests in each crate with cargo-make + feature_check_and_test: + runs-on: ubuntu-latest + steps: + # install cargo-make + - uses: davidB/rust-cargo-make@v1 + - uses: actions/checkout@v2 + # feature check fe2o3-amqp + - name: feature_check + run: (cd fe2o3-amqp && cargo make feature_check) + # test all crates + - name: test serde_amqp + run: (cd serde_amqp && cargo make test) + - name: test fe2o3-amqp-types + run: (cd fe2o3-amqp-types && cargo make test) + - name: test fe2o3-amqp + run: (cd fe2o3-amqp && cargo make test) + - name: test fe2o3-amqp-cbs + run: (cd fe2o3-amqp-cbs && cargo make test) + - name: test fe2o3-amqp-ext + run: (cd fe2o3-amqp-ext && cargo make test) + - name: test fe2o3-amqp-management + run: (cd fe2o3-amqp-management && cargo make test) + - name: test fe2o3-amqp-ws + run: (cd fe2o3-amqp-ws && cargo make test) +