Skip to content

Commit c3818a8

Browse files
committed
chore: update ci
1 parent 7a44923 commit c3818a8

File tree

9 files changed

+38
-63
lines changed

9 files changed

+38
-63
lines changed

.github/workflows/ci-fortuna.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -17,19 +17,13 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919
- uses: Swatinem/rust-cache@v2
20-
with:
21-
workspaces: "apps/fortuna -> target"
22-
- uses: actions-rs/toolchain@v1
23-
with:
24-
toolchain: 1.82.0
25-
override: true
26-
components: rustfmt, clippy
20+
- uses: actions-rust-lang/setup-rust-toolchain@v1
2721
- name: Format check
2822
run: cargo fmt --all -- --check
2923
if: success() || failure()
3024
- name: Clippy check
31-
run: cargo clippy --tests -- --deny warnings
25+
run: cargo clippy -p fortuna --all-targets -- --deny warnings
3226
if: success() || failure()
3327
- name: Run tests
34-
run: cargo test
28+
run: cargo test -p fortuna
3529
if: success() || failure()

.github/workflows/ci-lazer-rust.yml

Lines changed: 2 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -20,12 +20,7 @@ jobs:
2020
with:
2121
submodules: recursive
2222
- uses: actions-rust-lang/setup-rust-toolchain@v1
23-
with:
24-
toolchain: 1.82.0
25-
components: clippy,rustfmt
2623
- uses: Swatinem/rust-cache@v2
27-
with:
28-
workspaces: "lazer -> target"
2924
- name: Install Protoc
3025
uses: arduino/setup-protoc@v3
3126
with:
@@ -45,11 +40,8 @@ jobs:
4540
run: cargo fmt --all -- --check
4641
if: success() || failure()
4742
- name: Clippy check
48-
run: cargo clippy --all-targets -- --deny warnings
49-
if: success() || failure()
50-
- name: Build Solana programs
51-
run: cargo build-sbf
43+
run: cargo clippy -p pyth-lazer-protocol -p pyth-lazer-client -p pyth-lazer-publisher-sdk --all-targets -- --deny warnings
5244
if: success() || failure()
5345
- name: test
54-
run: cargo test
46+
run: cargo test -p pyth-lazer-protocol -p pyth-lazer-client -p pyth-lazer-publisher-sdk
5547
if: success() || failure()

.github/workflows/ci-lazer-solana-contract.yml

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -49,3 +49,11 @@ jobs:
4949
RUSTFLAGS= cargo +1.79.0 install --git https://github.com/coral-xyz/anchor --tag v0.30.1 --locked anchor-cli
5050
- name: Run anchor tests
5151
run: pnpm run test:anchor
52+
- name: check Cargo.toml formatting
53+
run: find . -name Cargo.toml -exec taplo fmt --check --diff {} \;
54+
- name: Format check
55+
run: cargo fmt --all -- --check
56+
- name: Clippy check
57+
run: cargo clippy --all-targets -- --deny warnings
58+
- name: test
59+
run: cargo test

.github/workflows/ci-pyth-lazer-agent.yml

Lines changed: 2 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -20,18 +20,13 @@ jobs:
2020
with:
2121
submodules: recursive
2222
- uses: actions-rust-lang/setup-rust-toolchain@v1
23-
with:
24-
toolchain: 1.87.0
25-
components: clippy,rustfmt
2623
- uses: Swatinem/rust-cache@v2
27-
with:
28-
workspaces: "apps/pyth-lazer-agent -> target"
2924
- name: Format check
3025
run: cargo fmt --all -- --check
3126
if: success() || failure()
3227
- name: Clippy check
33-
run: cargo clippy --all-targets -- --deny warnings
28+
run: cargo clippy -p pyth-lazer-agent --all-targets -- --deny warnings
3429
if: success() || failure()
3530
- name: test
36-
run: cargo test
31+
run: cargo test -p pyth-lazer-agent
3732
if: success() || failure()

.github/workflows/ci-pythnet-sdk.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,14 @@ jobs:
1515
working-directory: pythnet/pythnet_sdk
1616
steps:
1717
- uses: actions/checkout@v2
18+
- uses: actions-rust-lang/setup-rust-toolchain@v1
1819
- uses: Swatinem/rust-cache@v2
19-
with:
20-
workspaces: "pythnet/pythnet_sdk -> target"
21-
- uses: actions-rs/toolchain@v1
22-
with:
23-
toolchain: 1.82.0
24-
components: rustfmt, clippy
25-
override: true
2620
- name: Format check
2721
run: cargo fmt --all -- --check
2822
if: success() || failure()
2923
- name: Clippy check
30-
run: cargo clippy --tests -- --deny warnings
24+
run: cargo clippy -p pythnet-sdk --all-targets -- --deny warnings
3125
if: success() || failure()
3226
- name: Run executor tests
33-
run: cargo test
27+
run: cargo test -p pythnet-sdk
3428
if: success() || failure()

.github/workflows/ci-quorum.yml

Lines changed: 3 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -15,20 +15,14 @@ jobs:
1515
working-directory: apps/quorum
1616
steps:
1717
- uses: actions/checkout@v2
18+
- uses: actions-rust-lang/setup-rust-toolchain@v1
1819
- uses: Swatinem/rust-cache@v2
19-
with:
20-
workspaces: "apps/quorum -> target"
21-
- uses: actions-rs/toolchain@v1
22-
with:
23-
toolchain: 1.87.0
24-
components: rustfmt, clippy
25-
override: true
2620
- name: Format check
2721
run: cargo fmt --all -- --check
2822
if: success() || failure()
2923
- name: Clippy check
30-
run: cargo clippy --tests -- --deny warnings
24+
run: cargo clippy -p quorum --all-targets -- --deny warnings
3125
if: success() || failure()
3226
- name: Run executor tests
33-
run: cargo test
27+
run: cargo test -p quorum
3428
if: success() || failure()

.github/workflows/ci-starknet-tools.yml

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -9,33 +9,33 @@ on:
99
jobs:
1010
test:
1111
runs-on: ubuntu-latest
12+
defaults:
13+
run:
14+
working-directory: target_chains/starknet/tools/test_vaas
1215
steps:
13-
- uses: actions/checkout@v2
14-
- uses: actions-rs/toolchain@v1
15-
with:
16-
toolchain: 1.86.0
17-
components: rustfmt, clippy
18-
override: true
1916
- uses: actions/checkout@v3
17+
- uses: actions-rust-lang/setup-rust-toolchain@v1
2018
- uses: Swatinem/rust-cache@v2
21-
with:
22-
workspaces: "target_chains/starknet/tools/test_vaas -> target"
2319
- name: Install Scarb
2420
uses: software-mansion/setup-scarb@v1
2521
with:
26-
tool-versions: target_chains/starknet/contracts/.tool-versions
22+
tool-versions: ../../contracts/.tool-versions
2723
- name: Install Starkli
28-
run: curl https://get.starkli.sh | sh && . ~/.config/.starkli/env && starkliup -v $(awk '/starkli/{print $2}' target_chains/starknet/contracts/.tool-versions)
24+
run: |
25+
curl https://get.starkli.sh | sh
26+
. ~/.config/.starkli/env
27+
starkliup -v $(awk '/starkli/{print $2}' ../../contracts/.tool-versions)
28+
echo "${HOME}/.starkli/bin" >> "${GITHUB_PATH}"
2929
- name: Check formatting
30-
run: cargo fmt --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml -- --check
30+
run: cargo fmt -- --check
3131
- name: Run clippy
32-
run: cargo clippy --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml --all-targets -- --deny warnings
32+
run: cargo clippy -p test_vaas --all-targets -- --deny warnings
3333
- name: Run generate_keypair binary
34-
run: cargo run --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml --bin generate_keypair
34+
run: cargo run --bin generate_keypair
3535
- name: Check test data
3636
run: |
37-
. ~/.config/.starkli/env && cargo run --manifest-path ./target_chains/starknet/tools/test_vaas/Cargo.toml --bin generate_test_data > ./target_chains/starknet/contracts/data.cairo
38-
cd target_chains/starknet/contracts && scarb fmt data.cairo
37+
. ~/.config/.starkli/env && cargo run --bin generate_test_data > ../../contracts/data.cairo
38+
cd ../../contracts && scarb fmt data.cairo
3939
if ! diff ./tests/data.cairo data.cairo; then
4040
>&2 echo "Re-run generate_test_data to update data.cairo"
4141
exit 1

apps/fortuna/Cargo.toml

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -50,6 +50,3 @@ sqlx = { version = "0.8", features = ["runtime-tokio", "sqlite", "chrono"] }
5050

5151
[dev-dependencies]
5252
axum-test = "13.1.1"
53-
54-
[lints]
55-
workspace = true

rust-toolchain.toml

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
[toolchain]
22
channel = "1.88.0"
3-
profile = "default"
3+
profile = "minimal"
4+
components = ["rustfmt", "clippy"]

0 commit comments

Comments
 (0)