ci: 馃摝 update rust version #4
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: Build & Test | |
| on: | |
| workflow_call: | |
| workflow_dispatch: | |
| inputs: | |
| logLevel: | |
| description: "Log level" | |
| required: true | |
| default: "warning" | |
| pull_request_target: | |
| types: [opened, reopened, synchronize] | |
| push: | |
| branches: | |
| - main | |
| env: | |
| STAGE: dev | |
| REPOSITORY: node-handshake | |
| RUST_BACKTRACE: 1 | |
| CARGO_TERM_COLOR: always | |
| jobs: | |
| build: | |
| environment: dev | |
| runs-on: ubuntu-latest | |
| name: Build | |
| steps: | |
| # Checkout code from the repository | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Install Rust | |
| run: | | |
| rustup set profile minimal | |
| rustup toolchain install 1.86 -c rust-docs | |
| rustup default 1.89 | |
| # Cache dependencies to speed up build times | |
| - name: Cache dependencies | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ./.cargo | |
| ./target/ | |
| key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
| restore-keys: ${{ runner.os }}-cargo- | |
| - name: Build and Test | |
| run: | | |
| cargo build --verbose | |
| cargo test --verbose |