From c208283332f306abf4d8b3aeb75607623bb63834 Mon Sep 17 00:00:00 2001 From: Bogdan Mart Date: Sat, 24 Dec 2022 01:23:54 +0200 Subject: [PATCH] Addressed PR comments. Removed not working CI steps. --- .github/workflows/check-and-lint.yaml | 28 ------------------------ .github/workflows/test.yaml | 31 ++------------------------- 2 files changed, 2 insertions(+), 57 deletions(-) diff --git a/.github/workflows/check-and-lint.yaml b/.github/workflows/check-and-lint.yaml index 275e5a0..c702427 100644 --- a/.github/workflows/check-and-lint.yaml +++ b/.github/workflows/check-and-lint.yaml @@ -38,31 +38,3 @@ jobs: - name: Run Rustfmt run: cargo fmt --all -- --check -# TODO clippy action is deprecated. Perhaps use https://github.com/actions-rs/clippy-check but it require more work -# clippy: -# name: Clippy -# runs-on: ubuntu-latest -# steps: -# - uses: actions/checkout@v3 -# - uses: dtolnay/rust-toolchain@stable -# with: -# components: clippy -# - name: Cache dependencies -# uses: actions/cache@v3 -# env: -# cache-name: cache-dependencies -# with: -# path: | -# ~/.cargo/.crates.toml -# ~/.cargo/.crates2.json -# ~/.cargo/bin -# ~/.cargo/registry/index -# ~/.cargo/registry/cache -## target -# key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} -# - uses: actions-rs/clippy-check@v1 -# continue-on-error: true # currently Clippy would fail. TODO fix warnings. -# with: -# token: ${{ secrets.GITHUB_TOKEN }} -# args: --all-features -# name: Clippy Output diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index d32a7db..14ad819 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -39,37 +39,10 @@ jobs: ~/.cargo/bin ~/.cargo/registry/index ~/.cargo/registry/cache -# target +# target <-- this can spead up CI a lot, but could lead to cache to grow indefinitely key: ${{ runner.os }}-${{ matrix.arch }}-build-v2-${{ env.cache-name }}-${{ hashFiles('Cargo.lock') }} - - name: Install cargo-suity - run: cargo install cargo-suity - name: Run tests - run: cargo suity - - name: Upload raw Unit Test results - if: always() - uses: actions/upload-artifact@v3 - with: - name: Unit Test Results (${{ matrix.os }}) - path: ./test-results/* - publish-test-results: - name: "Publish Unit Tests Results" - needs: test - runs-on: ubuntu-latest - if: always() - - steps: - - name: Download Artifacts - uses: actions/download-artifact@v3 - with: - path: artifacts - - - name: Publish Unit Test Results - # TODO this won't work for PRs from contributors, - # see: https://github.com/EnricoMi/publish-unit-test-result-action/blob/v1.20/README.md#support-fork-repositories-and-dependabot-branches - # and https://securitylab.github.com/research/github-actions-preventing-pwn-requests/ - uses: EnricoMi/publish-unit-test-result-action@v1 - with: - files: "artifacts/**/*.xml" + run: cargo test # orginal example used code coverage and tests reports, but disable it for now # https://github.com/BamPeers/rust-ci-github-actions-workflow/blob/main/.github/workflows/test.yaml