build(deps): bump cargo group with 5 updates #116
This file contains hidden or 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: Rust | |
| permissions: | |
| contents: read | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - crates/**/*.rs | |
| - crates/**/Cargo.toml | |
| - .github/workflows/rust.yml | |
| tags: | |
| - 'rf24-rs/*' | |
| - 'rf24ble-rs/*' | |
| # - 'rf24network-rs/*' | |
| # - 'rf24mesh-rs/*' | |
| pull_request: | |
| branches: [main] | |
| paths: | |
| - crates/**/*.rs | |
| - crates/**/Cargo.toml | |
| - .github/workflows/rust.yml | |
| env: | |
| CARGO_TERM_COLOR: always | |
| RUST_BACKTRACE: 1 | |
| defaults: | |
| run: | |
| shell: bash | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v5 | |
| - name: Setup Rust | |
| run: rustup update --no-self-update | |
| - name: Install cargo-binstall | |
| uses: cargo-bins/cargo-binstall@main | |
| - name: Install cargo-llvm-cov and cargo-nextest | |
| run: cargo binstall -y cargo-nextest cargo-llvm-cov | |
| - name: Setup nushell | |
| uses: hustcer/setup-nu@v3 | |
| with: | |
| version: ${{ vars.NU_SHELL_VERSION || '*' }} | |
| - name: Cache deps | |
| uses: actions/cache@v4 | |
| with: | |
| path: ~/.cargo | |
| key: cargo-crates-${{ hashFiles('crates/*/src/**', 'crates/**/Cargo.toml') }} | |
| - run: rustup component add llvm-tools-preview | |
| # this enables a tool (for default toolchain) needed to measure code coverage. | |
| - name: Run tests | |
| run: nu -c "use nurfile *; nur test --profile ci" | |
| - name: Generate coverage reports | |
| run: nu -c "use nurfile *; nur test lcov" | |
| - uses: codecov/codecov-action@v5 | |
| if: github.repository == 'nRF24/rf24-rs' | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: lcov.info | |
| fail_ci_if_error: true | |
| publish: | |
| name: Publish | |
| runs-on: ubuntu-latest | |
| if: startswith(github.ref, 'refs/tags/') | |
| permissions: | |
| contents: write | |
| steps: | |
| - uses: actions/checkout@v5 | |
| with: | |
| persist-credentials: false | |
| - name: Setup nushell | |
| uses: hustcer/setup-nu@v3 | |
| with: | |
| version: ${{ vars.NU_SHELL_VERSION || '*' }} | |
| - name: Get pkg from tag | |
| id: pkg | |
| shell: nu {0} | |
| run: |- | |
| let tag = ${{ github.ref_name }} | |
| let pkg = $tag | parse "{name}/{version}" | first | |
| $"name=($pkg | get name)\n" | save --append $env.GITHUB_OUTPUT | |
| - name: Install Rust | |
| run: rustup update stable --no-self-update | |
| - run: cargo publish -p ${{ steps.pkg.outputs.name }} | |
| env: | |
| CARGO_REGISTRY_TOKEN: ${{ secrets.CARGO_REGISTRY_TOKEN }} |