Skip to content

Commit

Permalink
chore: move coverage action out of basic
Browse files Browse the repository at this point in the history
  • Loading branch information
polazarus committed Aug 11, 2023
1 parent c17a10c commit b8b87f0
Show file tree
Hide file tree
Showing 2 changed files with 38 additions and 27 deletions.
28 changes: 1 addition & 27 deletions .github/workflows/basic.yml
Original file line number Diff line number Diff line change
Expand Up @@ -110,30 +110,4 @@ jobs:
- uses: taiki-e/install-action@cargo-minimal-versions

- name: Check with minimal versions
run: cargo minimal-versions check --workspace

coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Resolve dependencies
run: cargo generate-lockfile

- name: cargo llvm-cov
run: cargo llvm-cov --locked --all-features --codecov --output-path codecov.json

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
file: codecov.json
fail_ci_if_error: true
run: cargo minimal-versions check --workspace
37 changes: 37 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,37 @@
name: coverage

on:
push:
branches: [ "main" ]
pull_request:
branches: [ "main" ]

env:
CARGO_TERM_COLOR: always

jobs:
coverage:
runs-on: ubuntu-latest

steps:
- uses: actions/checkout@v3

- name: Install stable
uses: dtolnay/rust-toolchain@stable
with:
components: llvm-tools

- name: Install cargo-llvm-cov
uses: taiki-e/install-action@cargo-llvm-cov

- name: Resolve dependencies
run: cargo generate-lockfile

- name: cargo llvm-cov
run: cargo llvm-cov --locked --all-features --codecov --output-path codecov.json

- name: Upload to codecov.io
uses: codecov/codecov-action@v3
with:
file: codecov.json
fail_ci_if_error: true

0 comments on commit b8b87f0

Please sign in to comment.