Skip to content

Commit 2c0aa5a

Browse files
authored
ci - fixing warnings (#211)
* ci: disable caching and conditionally set up go Signed-off-by: mikeee <[email protected]> * ci: update actions/checkout to v4 and locks fossa to v1 Signed-off-by: mikeee <[email protected]> * ci: fix typo Signed-off-by: mikeee <[email protected]> * chore: update ignores to all targets Signed-off-by: mikeee <[email protected]> * ci: migrate rust action, auth protoc setup, build examples and proto-gen Signed-off-by: mikeee <[email protected]> * fix: change branch name reference to master Signed-off-by: mikeee <[email protected]> * ci: bump setup-protoc to v3 Signed-off-by: mikeee <[email protected]> * ci: install protoc pinned 24.4 Signed-off-by: mikeee <[email protected]> --------- Signed-off-by: mikeee <[email protected]>
1 parent 5e699df commit 2c0aa5a

File tree

4 files changed

+42
-34
lines changed

4 files changed

+42
-34
lines changed

.github/workflows/ci.yml

Lines changed: 30 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -15,26 +15,26 @@ on:
1515
env:
1616
CARGO_TERM_COLOR: always
1717
CARGO_TOKEN: ${{ secrets.CRATES_IO_TOKEN }}
18-
PROTOC_VERSION: 3.x
19-
RUST_TOOLCHAIN: 1.79.0
18+
PROTOC_VERSION: 24.4
19+
RUSTUP_TOOLCHAIN: stable
2020

2121
jobs:
2222
lint:
2323
name: Lint
2424
runs-on: ubuntu-latest
2525

2626
steps:
27-
- name: Install Rust Toolchain
28-
uses: actions-rs/toolchain@v1
27+
- name: Install Rust
28+
uses: dtolnay/rust-toolchain@master
2929
with:
30-
toolchain: ${{ env.RUST_TOOLCHAIN }}
31-
override: true
32-
components: rustfmt, clippy
30+
toolchain: stable
31+
components: clippy, rustfmt
3332
- name: Install Protoc
34-
uses: arduino/setup-protoc@v1
33+
uses: arduino/setup-protoc@v3
3534
with:
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
3636
version: ${{ env.PROTOC_VERSION }}
37-
- uses: actions/checkout@v2
37+
- uses: actions/checkout@v4
3838
- name: cargo fmt
3939
run: cargo fmt -- --check --color ${{ env.CARGO_TERM_COLOR }}
4040
- name: cargo clippy
@@ -46,21 +46,27 @@ jobs:
4646
runs-on: ubuntu-latest
4747

4848
steps:
49-
- name: Install Rust Toolchain
50-
uses: actions-rs/toolchain@v1
49+
- name: Install Rust
50+
uses: dtolnay/rust-toolchain@master
5151
with:
52-
toolchain: ${{ env.RUST_TOOLCHAIN }}
53-
override: true
54-
components: rustfmt, clippy
52+
toolchain: stable
53+
components: clippy, rustfmt
5554
- name: Install Protoc
56-
uses: arduino/setup-protoc@v1
55+
uses: arduino/setup-protoc@v3
5756
with:
57+
repo-token: ${{ secrets.GITHUB_TOKEN }}
5858
version: ${{ env.PROTOC_VERSION }}
59-
- uses: actions/checkout@v2
59+
- uses: actions/checkout@v4
6060
- name: Build
6161
run: cargo build
6262
- name: Build examples
63-
run: cargo build --examples
63+
run: |
64+
cd examples
65+
cargo build --examples
66+
- name: Build proto-gen
67+
run: |
68+
cd proto-gen
69+
cargo build
6470
- name: Run Tests
6571
run: cargo test --all-targets
6672

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

7379
steps:
74-
- name: Install Rust Toolchain
75-
uses: actions-rs/toolchain@v1
80+
- name: Install Rust
81+
uses: dtolnay/rust-toolchain@master
7682
with:
77-
toolchain: ${{ env.RUST_TOOLCHAIN }}
78-
override: true
79-
components: rustfmt, clippy
83+
toolchain: stable
84+
components: clippy, rustfmt
8085
- name: Install Protoc
81-
uses: arduino/setup-protoc@v1
86+
uses: arduino/setup-protoc@v3
8287
with:
88+
repo-token: ${{ secrets.GITHUB_TOKEN }}
8389
version: ${{ env.PROTOC_VERSION }}
84-
- uses: actions/checkout@v2
90+
- uses: actions/checkout@v4
8591
- name: cargo publish dapr-macros
8692
run: cargo publish --manifest-path dapr-macros/Cargo.toml --token ${{ env.CARGO_TOKEN }}
8793
- name: cargo publish dapr

.github/workflows/fossa.yml

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -32,15 +32,15 @@ jobs:
3232
FOSSA_API_KEY: b88e1f4287c3108c8751bf106fb46db6 # This is a push-only token that is safe to be exposed.
3333
steps:
3434
- name: "Checkout code"
35-
uses: actions/checkout@v2
35+
uses: actions/checkout@v4
3636

3737
- name: "Run FOSSA Scan"
38-
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
38+
uses: fossas/fossa-action@v1 # Use a specific version if locking is preferred
3939
with:
4040
api-key: ${{ env.FOSSA_API_KEY }}
4141

4242
- name: "Run FOSSA Test"
43-
uses: fossas/fossa-action@main # Use a specific version if locking is preferred
43+
uses: fossas/fossa-action@v1 # Use a specific version if locking is preferred
4444
with:
4545
api-key: ${{ env.FOSSA_API_KEY }}
4646
run-tests: true

.github/workflows/validate-examples.yml

Lines changed: 8 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,6 @@ jobs:
7171
repository: ${{ env.CHECKOUT_REPO }}
7272
ref: ${{ env.CHECKOUT_REF }}
7373

74-
- name: Set up Go
75-
uses: actions/setup-go@v5
76-
with:
77-
go-version: "stable"
78-
7974
- name: Determine latest Dapr Runtime version
8075
if: env.DAPR_RUNTIME_VERSION == ''
8176
run: |
@@ -106,6 +101,13 @@ jobs:
106101
ref: ${{ env.DAPR_REF }}
107102
path: dapr_runtime
108103

104+
- name: Set up Go
105+
uses: actions/setup-go@v5
106+
if: env.DAPR_REF != '' || env.DAPR_CLI_REF != ''
107+
with:
108+
cache: false
109+
go-version: "stable"
110+
109111
- name: Build dapr cli with referenced commit and override version
110112
if: env.DAPR_CLI_REF != ''
111113
run: |
@@ -246,7 +248,7 @@ jobs:
246248
- name: Install Protoc
247249
uses: arduino/setup-protoc@v3
248250
with:
249-
version: "25.2"
251+
version: "24.4"
250252
repo-token: ${{ secrets.GITHUB_TOKEN }}
251253

252254
- name: Set up Dapr CLI ${{ env.DAPR_CLI_VERSION }}

.gitignore

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
# Generated by Cargo
22
# will have compiled files and executables
3-
/target/
3+
target/
44

55
# Remove Cargo.lock from gitignore if creating an executable, leave it for libraries
66
# More information here https://doc.rust-lang.org/cargo/guide/cargo-toml-vs-cargo-lock.html

0 commit comments

Comments
 (0)