diff options
author | Rina Fujino <18257209+rina23q@users.noreply.github.com> | 2021-10-20 15:25:26 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-10-20 15:25:26 +0200 |
commit | caeba2186f8da1b7893e0a883b269144cb9368b1 (patch) | |
tree | d6b4c9a3ac0518725c46c2dce7a326d47c070d1e /.github | |
parent | 9791ecb8d67b1c8d160b2720765bdd6e74052fe2 (diff) |
Move cargo tarpaulin and audit to a different commit workflow (#519)
* Move cargo tarpaulin and audit to a different commit workflow
Signed-off-by: Rina Fujino <18257209+rina23q@users.noreply.github.com>
Diffstat (limited to '.github')
-rw-r--r-- | .github/workflows/commit-workflow-optional.yml | 72 | ||||
-rw-r--r-- | .github/workflows/commit-workflow.yml | 63 |
2 files changed, 72 insertions, 63 deletions
diff --git a/.github/workflows/commit-workflow-optional.yml b/.github/workflows/commit-workflow-optional.yml new file mode 100644 index 00000000..88dc2bd6 --- /dev/null +++ b/.github/workflows/commit-workflow-optional.yml @@ -0,0 +1,72 @@ +name: commit-workflow-optional + +on: + push: + branches: [ main ] + workflow_dispatch: + branches: [ main ] + pull_request: + branches: [ main ] + +env: + CARGO_TERM_COLOR: always + +jobs: + + cargo-tarpaulin: + + name: Run cargo tarpaulin + runs-on: Ubuntu-20.04 + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Install rust v1.54.0 + uses: actions-rs/toolchain@v1 + with: + toolchain: "1.54.0" + override: true + + - name: Enable cache + # https://github.com/marketplace/actions/rust-cache + uses: Swatinem/rust-cache@v1 + + - name: install libssl + run: sudo apt install libssl-dev + + - name: Cargo install tarpaulin + uses: actions-rs/cargo@v1 + # https://github.com/marketplace/actions/rust-cargo + with: + command: install + args: cargo-tarpaulin + + - name: Cargo tarpaulin + uses: actions-rs/cargo@v1 + # https://github.com/marketplace/actions/rust-cargo + with: + command: tarpaulin + args: --skip-clean --avoid-cfg-tarpaulin -v --out Xml + + - name: Upload to codecov.io + uses: codecov/codecov-action@v1 + with: + token: ${{secrets.CODECOV_TOKEN}} + + cargo-audit: + + name: Run cargo audit + runs-on: Ubuntu-20.04 + + steps: + + - name: Checkout + uses: actions/checkout@v2 + + - name: Cargo audit + uses: actions-rs/cargo@v1 + # https://github.com/marketplace/actions/rust-cargo + with: + command: audit diff --git a/.github/workflows/commit-workflow.yml b/.github/workflows/commit-workflow.yml index e2cd7cf6..8638f20e 100644 --- a/.github/workflows/commit-workflow.yml +++ b/.github/workflows/commit-workflow.yml @@ -94,69 +94,6 @@ jobs: command: build args: --release - cargo-tarpaulin: - - name: Run cargo tarpaulin - runs-on: Ubuntu-20.04 - needs: [cargo-fmt, cargo-clippy] - continue-on-error: true # Only temporarily !!! - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Install rust v1.54.0 - uses: actions-rs/toolchain@v1 - with: - toolchain: "1.54.0" - override: true - - - name: Enable cache - # https://github.com/marketplace/actions/rust-cache - uses: Swatinem/rust-cache@v1 - - - name: install libssl - run: sudo apt install libssl-dev - - - name: Cargo install tarpaulin - uses: actions-rs/cargo@v1 - # https://github.com/marketplace/actions/rust-cargo - with: - command: install - args: cargo-tarpaulin - - - name: Cargo tarpaulin - continue-on-error: true # Only temporarily !!! - uses: actions-rs/cargo@v1 - # https://github.com/marketplace/actions/rust-cargo - with: - command: tarpaulin - args: --skip-clean --avoid-cfg-tarpaulin -v --out Xml - - - name: Upload to codecov.io - uses: codecov/codecov-action@v1 - with: - token: ${{secrets.CODECOV_TOKEN}} - - cargo-audit: - - name: Run cargo audit - runs-on: Ubuntu-20.04 - needs: [cargo-fmt, cargo-clippy] - - - steps: - - - name: Checkout - uses: actions/checkout@v2 - - - name: Cargo audit - uses: actions-rs/cargo@v1 - # https://github.com/marketplace/actions/rust-cargo - with: - command: audit - cargo-outdated: name: Run cargo outdated |