From 4b389405f826c4699f8db159050ced6fc4f31b7c Mon Sep 17 00:00:00 2001 From: Ruslan Pislari Date: Wed, 15 May 2024 10:23:02 +0300 Subject: [PATCH] fix: clippy warning and new release flow --- .github/workflows/ci.yaml | 74 +++++++++++++++++----------------- .github/workflows/release.yaml | 33 --------------- 2 files changed, 37 insertions(+), 70 deletions(-) delete mode 100644 .github/workflows/release.yaml diff --git a/.github/workflows/ci.yaml b/.github/workflows/ci.yaml index aeb72b0..9dc3307 100644 --- a/.github/workflows/ci.yaml +++ b/.github/workflows/ci.yaml @@ -23,29 +23,29 @@ jobs: toolchain: stable components: rustfmt, clippy -# - name: Release build -# uses: actions-rs/cargo@v1 -# with: -# command: build -# args: --release --all-features + - name: Release build + uses: actions-rs/cargo@v1 + with: + command: build + args: --release --all-features -# - name: Install cargo-audit binary crate -# uses: actions-rs/install@v0.1 -# with: -# crate: cargo-audit -# version: latest -# use-tool-cache: true + - name: Install cargo-audit binary crate + uses: actions-rs/install@v0.1 + with: + crate: cargo-audit + version: latest + use-tool-cache: true -# - name: Annotate commit with clippy warnings -# uses: actions-rs/clippy-check@v1 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# args: --all-features + - name: Annotate commit with clippy warnings + uses: actions-rs/clippy-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} + args: --all-features -# - name: Security audit -# uses: actions-rs/audit-check@v1 -# with: -# token: ${{ secrets.GITHUB_TOKEN }} + - name: Security audit + uses: actions-rs/audit-check@v1 + with: + token: ${{ secrets.GITHUB_TOKEN }} coverage: needs: build @@ -62,22 +62,22 @@ jobs: toolchain: nightly override: true -# - uses: actions-rs/cargo@v1# -# name: Run test with code coverage report -# with: -# command: test -# args: --all-features --no-fail-fast -# env: -# CARGO_INCREMENTAL: '0' -# RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' -# RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + - uses: actions-rs/cargo@v1 + name: Run test with code coverage report + with: + command: test + args: --all-features --no-fail-fast + env: + CARGO_INCREMENTAL: '0' + RUSTFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' + RUSTDOCFLAGS: '-Zprofile -Ccodegen-units=1 -Cinline-threshold=0 -Clink-dead-code -Coverflow-checks=off -Cpanic=abort -Zpanic_abort_tests' -# - id: coverage -# name: Collect code coverage -# uses: actions-rs/grcov@v0.1 + - id: coverage + name: Collect code coverage + uses: actions-rs/grcov@v0.1 -# - name: Archive code coverage results -# uses: actions/upload-artifact@v4 -# with: -# name: code-coverage-report -# path: ${{ steps.coverage.outputs.report }} \ No newline at end of file + - name: Archive code coverage results + uses: actions/upload-artifact@v4 + with: + name: code-coverage-report + path: ${{ steps.coverage.outputs.report }} \ No newline at end of file diff --git a/.github/workflows/release.yaml b/.github/workflows/release.yaml deleted file mode 100644 index e12e2b7..0000000 --- a/.github/workflows/release.yaml +++ /dev/null @@ -1,33 +0,0 @@ -name: Release - -permissions: - pull-requests: write - contents: write - -on: - push: - branches: - - 'main' - -jobs: - release: - name: Release - runs-on: ubuntu-latest - steps: - - name: Clone repo - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Setup Rust - uses: actions-rs/toolchain@v1 - with: - profile: minimal - toolchain: stable - target: wasm32-wasi - - - name: Run Release PR - uses: MarcoIeni/release-plz-action@v0.5 - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} - CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }}