Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci - fixing warnings #211

Merged
merged 8 commits into from
Aug 19, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
54 changes: 30 additions & 24 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,26 +15,26 @@ on:
env:
CARGO_TERM_COLOR: always
CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
PROTOC_VERSION: 3.x
RUST_TOOLCHAIN: 1.79.0
PROTOC_VERSION: 24.4
RUSTUP_TOOLCHAIN: stable

jobs:
lint:
name: Lint
runs-on: ubuntu-latest

steps:
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt, clippy
toolchain: stable
components: clippy, rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.PROTOC_VERSION }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: cargo fmt
run: cargo fmt -- --check --color ${{ env.CARGO_TERM_COLOR }}
- name: cargo clippy
Expand All @@ -46,21 +46,27 @@ jobs:
runs-on: ubuntu-latest

steps:
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt, clippy
toolchain: stable
components: clippy, rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.PROTOC_VERSION }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Build
run: cargo build
- 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
run: cargo test --all-targets

Expand All @@ -71,17 +77,17 @@ jobs:
if: startswith(github.ref, 'refs/tags/v')

steps:
- name: Install Rust Toolchain
uses: actions-rs/toolchain@v1
- name: Install Rust
uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ env.RUST_TOOLCHAIN }}
override: true
components: rustfmt, clippy
toolchain: stable
components: clippy, rustfmt
- name: Install Protoc
uses: arduino/setup-protoc@v1
uses: arduino/setup-protoc@v3
with:
repo-token: ${{ secrets.GITHUB_TOKEN }}
version: ${{ env.PROTOC_VERSION }}
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: cargo publish dapr-macros
run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }}
- name: cargo publish dapr
Expand Down
6 changes: 3 additions & 3 deletions .github/workflows/fossa.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,15 +32,15 @@ jobs:
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
steps:
- name: "Checkout code"
uses: actions/checkout@v2
uses: actions/checkout@v4

- 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:
api-key: ${{ env.FOSSA_API_KEY }}

- 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:
api-key: ${{ env.FOSSA_API_KEY }}
run-tests: true
14 changes: 8 additions & 6 deletions .github/workflows/validate-examples.yml
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,6 @@ jobs:
repository: ${{ env.CHECKOUT_REPO }}
ref: ${{ env.CHECKOUT_REF }}

- name: Set up Go
uses: actions/setup-go@v5
with:
go-version: "stable"

- name: Determine latest Dapr Runtime version
if: env.DAPR_RUNTIME_VERSION == ''
run: |
Expand Down Expand Up @@ -106,6 +101,13 @@ jobs:
ref: ${{ env.DAPR_REF }}
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
if: env.DAPR_CLI_REF != ''
run: |
Expand Down Expand Up @@ -246,7 +248,7 @@ jobs:
- name: Install Protoc
uses: arduino/setup-protoc@v3
with:
version: "25.2"
version: "24.4"
repo-token: ${{ secrets.GITHUB_TOKEN }}

- name: Set up Dapr CLI ${{ env.DAPR_CLI_VERSION }}
Expand Down
2 changes: 1 addition & 1 deletion .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Generated by Cargo
# will have compiled files and executables
/target/
target/

# 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
Expand Down
Loading