Skip to content

Commit

Permalink
Addressed PR comments. Removed not working CI steps.
Browse files Browse the repository at this point in the history
  • Loading branch information
Bogdan Mart committed Dec 23, 2022
1 parent 09fef3e commit c208283
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 57 deletions.
28 changes: 0 additions & 28 deletions .github/workflows/check-and-lint.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
31 changes: 2 additions & 29 deletions .github/workflows/test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down

0 comments on commit c208283

Please sign in to comment.