re-introduce oneshot export for compat with UserPrimitives #234
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Coverage | |
on: [pull_request, push] | |
jobs: | |
lint: | |
name: lint | |
runs-on: ubuntu-latest | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {command: fmt, rust: nightly} | |
- {command: clippy, rust: stable} | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v3 | |
- name: "Install Rust" | |
run: | | |
rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update -c rustfmt clippy | |
rustup default ${{ matrix.rust }} | |
shell: bash | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: ${{ inputs.cache-key }} | |
- name: Run cargo ${{matrix.command}} | |
uses: actions-rs/cargo@v1 | |
with: | |
command: ${{matrix.command}} | |
args: "${{matrix.command == 'fmt' && '-- --check' || '-- -D warnings'}}" | |
test: | |
name: Build & Test | |
strategy: | |
fail-fast: false | |
matrix: | |
include: | |
- {os: ubuntu, rust: stable} | |
- {os: windows, rust: stable} | |
- {os: macos, rust: stable} | |
runs-on: ${{matrix.os}}-latest | |
env: | |
CARGO_TERM_COLOR: always | |
steps: | |
- uses: actions/checkout@v3 | |
- name: "Install Rust" | |
run: | | |
rustup toolchain install ${{ matrix.rust }} --profile minimal --no-self-update -c llvm-tools-preview | |
rustup default ${{ matrix.rust }} | |
shell: bash | |
- uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: ${{ inputs.cache-key }} | |
- name: Install cargo-llvm-cov | |
uses: taiki-e/install-action@cargo-llvm-cov | |
- name: Generate code coverage | |
run: cargo llvm-cov --all-features --workspace --lcov --output-path lcov.info | |
- name: Upload coverage to Codecov | |
uses: codecov/codecov-action@v3 | |
with: | |
token: ${{ secrets.CODECOV_TOKEN }} # not required for public repos | |
files: lcov.info | |
fail_ci_if_error: true |