From d0b71b9b993e4bef3edcddb01de8a798b3b8352d Mon Sep 17 00:00:00 2001 From: DGonzalezVillal Date: Tue, 26 Mar 2024 23:02:37 +0000 Subject: [PATCH] Adding SNPHOST workflows to SNPGUEST Signed-off-by: DGonzalezVillal --- .github/workflows/lint.yml | 35 +++++++++++++++++++++++++++++++++++ .github/workflows/test.yml | 28 ++++++++++++++++++++++++++++ 2 files changed, 63 insertions(+) create mode 100644 .github/workflows/lint.yml create mode 100644 .github/workflows/test.yml diff --git a/.github/workflows/lint.yml b/.github/workflows/lint.yml new file mode 100644 index 0000000..9898208 --- /dev/null +++ b/.github/workflows/lint.yml @@ -0,0 +1,35 @@ +on: [push, pull_request] +name: lint +jobs: + fmt: + name: cargo fmt + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + components: rustfmt + toolchain: nightly + profile: minimal + override: true + - uses: actions-rs/cargo@v1 + with: + command: fmt + args: --all -- --check + + clippy: + name: cargo clippy + runs-on: ubuntu-latest + steps: + - run: sudo apt-get install -y asciidoctor + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + components: clippy + toolchain: 1.70.0 + profile: minimal + override: true + - uses: actions-rs/cargo@v1 + with: + command: clippy + args: --all-targets -- -D clippy::all -D unused_imports -Dwarnings diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml new file mode 100644 index 0000000..5987fbf --- /dev/null +++ b/.github/workflows/test.yml @@ -0,0 +1,28 @@ +on: [push, pull_request] +name: test +jobs: + test: + name: ${{ matrix.toolchain }} (${{ matrix.profile.name }}) + runs-on: ubuntu-latest + steps: + - run: sudo apt-get install -y asciidoctor + - uses: actions/checkout@v2 + - uses: actions-rs/toolchain@v1 + with: + toolchain: ${{ matrix.toolchain }} + override: true + - uses: actions-rs/cargo@v1 + with: + command: test + args: ${{ matrix.profile.flag }} + strategy: + fail-fast: false + matrix: + toolchain: + - nightly + - beta + - stable + profile: + - name: debug + - name: release + flag: --release