mirror of https://github.com/dapr/rust-sdk.git
ci - fixing warnings (#211)
* ci: disable caching and conditionally set up go Signed-off-by: mikeee <hey@mike.ee> * ci: update actions/checkout to v4 and locks fossa to v1 Signed-off-by: mikeee <hey@mike.ee> * ci: fix typo Signed-off-by: mikeee <hey@mike.ee> * chore: update ignores to all targets Signed-off-by: mikeee <hey@mike.ee> * ci: migrate rust action, auth protoc setup, build examples and proto-gen Signed-off-by: mikeee <hey@mike.ee> * fix: change branch name reference to master Signed-off-by: mikeee <hey@mike.ee> * ci: bump setup-protoc to v3 Signed-off-by: mikeee <hey@mike.ee> * ci: install protoc pinned 24.4 Signed-off-by: mikeee <hey@mike.ee> --------- Signed-off-by: mikeee <hey@mike.ee>
This commit is contained in:
parent
5e699df5a3
commit
2c0aa5a779
|
@ -15,8 +15,8 @@ on:
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
|
||||||
PROTOC_VERSION: 3.x
|
PROTOC_VERSION: 24.4
|
||||||
RUST_TOOLCHAIN: 1.79.0
|
RUSTUP_TOOLCHAIN: stable
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
lint:
|
lint:
|
||||||
|
@ -24,17 +24,17 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Rust Toolchain
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
toolchain: stable
|
||||||
override: true
|
components: clippy, rustfmt
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v1
|
uses: arduino/setup-protoc@v3
|
||||||
with:
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
version: ${{ env.PROTOC_VERSION }}
|
version: ${{ env.PROTOC_VERSION }}
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: cargo fmt
|
- name: cargo fmt
|
||||||
run: cargo fmt -- --check --color ${{ env.CARGO_TERM_COLOR }}
|
run: cargo fmt -- --check --color ${{ env.CARGO_TERM_COLOR }}
|
||||||
- name: cargo clippy
|
- name: cargo clippy
|
||||||
|
@ -46,21 +46,27 @@ jobs:
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Rust Toolchain
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
toolchain: stable
|
||||||
override: true
|
components: clippy, rustfmt
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v1
|
uses: arduino/setup-protoc@v3
|
||||||
with:
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
version: ${{ env.PROTOC_VERSION }}
|
version: ${{ env.PROTOC_VERSION }}
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: Build
|
- name: Build
|
||||||
run: cargo build
|
run: cargo build
|
||||||
- name: Build examples
|
- name: Build examples
|
||||||
run: cargo build --examples
|
run: |
|
||||||
|
cd examples
|
||||||
|
cargo build --examples
|
||||||
|
- name: Build proto-gen
|
||||||
|
run: |
|
||||||
|
cd proto-gen
|
||||||
|
cargo build
|
||||||
- name: Run Tests
|
- name: Run Tests
|
||||||
run: cargo test --all-targets
|
run: cargo test --all-targets
|
||||||
|
|
||||||
|
@ -71,17 +77,17 @@ jobs:
|
||||||
if: startswith(github.ref, 'refs/tags/v')
|
if: startswith(github.ref, 'refs/tags/v')
|
||||||
|
|
||||||
steps:
|
steps:
|
||||||
- name: Install Rust Toolchain
|
- name: Install Rust
|
||||||
uses: actions-rs/toolchain@v1
|
uses: dtolnay/rust-toolchain@master
|
||||||
with:
|
with:
|
||||||
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
toolchain: stable
|
||||||
override: true
|
components: clippy, rustfmt
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v1
|
uses: arduino/setup-protoc@v3
|
||||||
with:
|
with:
|
||||||
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
version: ${{ env.PROTOC_VERSION }}
|
version: ${{ env.PROTOC_VERSION }}
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v4
|
||||||
- name: cargo publish dapr-macros
|
- name: cargo publish dapr-macros
|
||||||
run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }}
|
run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }}
|
||||||
- name: cargo publish dapr
|
- name: cargo publish dapr
|
||||||
|
|
|
@ -32,15 +32,15 @@ jobs:
|
||||||
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
|
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
|
||||||
steps:
|
steps:
|
||||||
- name: "Checkout code"
|
- name: "Checkout code"
|
||||||
uses: actions/checkout@v2
|
uses: actions/checkout@v4
|
||||||
|
|
||||||
- name: "Run FOSSA Scan"
|
- name: "Run FOSSA Scan"
|
||||||
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
|
uses: fossas/fossa-action@v1 # Use a specific version if locking is preferred
|
||||||
with:
|
with:
|
||||||
api-key: ${{ env.FOSSA_API_KEY }}
|
api-key: ${{ env.FOSSA_API_KEY }}
|
||||||
|
|
||||||
- name: "Run FOSSA Test"
|
- name: "Run FOSSA Test"
|
||||||
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
|
uses: fossas/fossa-action@v1 # Use a specific version if locking is preferred
|
||||||
with:
|
with:
|
||||||
api-key: ${{ env.FOSSA_API_KEY }}
|
api-key: ${{ env.FOSSA_API_KEY }}
|
||||||
run-tests: true
|
run-tests: true
|
||||||
|
|
|
@ -71,11 +71,6 @@ jobs:
|
||||||
repository: ${{ env.CHECKOUT_REPO }}
|
repository: ${{ env.CHECKOUT_REPO }}
|
||||||
ref: ${{ env.CHECKOUT_REF }}
|
ref: ${{ env.CHECKOUT_REF }}
|
||||||
|
|
||||||
- name: Set up Go
|
|
||||||
uses: actions/setup-go@v5
|
|
||||||
with:
|
|
||||||
go-version: "stable"
|
|
||||||
|
|
||||||
- name: Determine latest Dapr Runtime version
|
- name: Determine latest Dapr Runtime version
|
||||||
if: env.DAPR_RUNTIME_VERSION == ''
|
if: env.DAPR_RUNTIME_VERSION == ''
|
||||||
run: |
|
run: |
|
||||||
|
@ -106,6 +101,13 @@ jobs:
|
||||||
ref: ${{ env.DAPR_REF }}
|
ref: ${{ env.DAPR_REF }}
|
||||||
path: dapr_runtime
|
path: dapr_runtime
|
||||||
|
|
||||||
|
- name: Set up Go
|
||||||
|
uses: actions/setup-go@v5
|
||||||
|
if: env.DAPR_REF != '' || env.DAPR_CLI_REF != ''
|
||||||
|
with:
|
||||||
|
cache: false
|
||||||
|
go-version: "stable"
|
||||||
|
|
||||||
- name: Build dapr cli with referenced commit and override version
|
- name: Build dapr cli with referenced commit and override version
|
||||||
if: env.DAPR_CLI_REF != ''
|
if: env.DAPR_CLI_REF != ''
|
||||||
run: |
|
run: |
|
||||||
|
@ -246,7 +248,7 @@ jobs:
|
||||||
- name: Install Protoc
|
- name: Install Protoc
|
||||||
uses: arduino/setup-protoc@v3
|
uses: arduino/setup-protoc@v3
|
||||||
with:
|
with:
|
||||||
version: "25.2"
|
version: "24.4"
|
||||||
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
repo-token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
|
||||||
- name: Set up Dapr CLI ${{ env.DAPR_CLI_VERSION }}
|
- name: Set up Dapr CLI ${{ env.DAPR_CLI_VERSION }}
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
# Generated by Cargo
|
# Generated by Cargo
|
||||||
# will have compiled files and executables
|
# will have compiled files and executables
|
||||||
/target/
|
target/
|
||||||
|
|
||||||
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
|
||||||
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html
|
||||||
|
|
Loading…
Reference in New Issue