Skip to content

Commit 86711ce

Browse files
authored
chore: Update GitHub Actions and dependencies (#61)
* Update GitHub Actions to latest versions The commit updates the used GitHub Actions to their latest versions. Specifically, it modifies the workflow files (publish.yml, rust.yml, lint.yml) to use actions/checkout@v4 and actions/cache@v4. Additionally, it simplifies the Rust toolchain setup in the lint workflow to just set the nightly toolchain override. * Update Rust toolchain setup in GitHub workflow The configuration for the Rust toolchain setup has been improved in the linting GitHub workflow. Not only does it set to use the nightly toolchain, but it also adds the clippy component for it. This ensures our workflow has the necessary tools for proper code linting. * Add rustfmt to lint workflow The commit includes rustfmt into the existing linting workflow in the Github actions. This additional component will help improve code formatting standards in the nightly toolchain. * Update package version and dependencies The package version of 'uniswap-sdk-core' has been upgraded from 0.20.1 to 0.21.0. Along with this, the dependency 'alloy-primitives' has also been updated from version 0.6 to 0.7.
1 parent 4fabfa8 commit 86711ce

File tree

4 files changed

+48
-50
lines changed

4 files changed

+48
-50
lines changed

.github/workflows/lint.yml

Lines changed: 43 additions & 45 deletions
Original file line numberDiff line numberDiff line change
@@ -1,45 +1,43 @@
1-
name: Rust Linting
2-
3-
on:
4-
push:
5-
branches:
6-
- master
7-
pull_request:
8-
9-
env:
10-
CARGO_TERM_COLOR: always
11-
12-
jobs:
13-
lint:
14-
name: Rust Lint Check
15-
runs-on: ubuntu-latest
16-
timeout-minutes: 30
17-
steps:
18-
- uses: actions/checkout@v3
19-
with:
20-
submodules: recursive
21-
22-
- name: Cache Cargo registry
23-
uses: actions/cache@v3
24-
with:
25-
path: |
26-
~/.cargo/registry
27-
~/.cargo/git
28-
target
29-
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30-
restore-keys: |
31-
${{ runner.os }}-cargo-registry-
32-
33-
- name: Install Rust toolchain
34-
uses: actions-rs/toolchain@v1
35-
with:
36-
profile: minimal
37-
toolchain: nightly
38-
override: true
39-
components: rustfmt, clippy
40-
41-
- name: Check lint
42-
run: cargo clippy -- -D warnings
43-
44-
- name: Check formatting
45-
run: cargo fmt -- --check
1+
name: Rust Linting
2+
3+
on:
4+
push:
5+
branches:
6+
- master
7+
pull_request:
8+
9+
env:
10+
CARGO_TERM_COLOR: always
11+
12+
jobs:
13+
lint:
14+
name: Rust Lint Check
15+
runs-on: ubuntu-latest
16+
timeout-minutes: 30
17+
steps:
18+
- uses: actions/checkout@v4
19+
with:
20+
submodules: recursive
21+
22+
- name: Cache Cargo registry
23+
uses: actions/cache@v4
24+
with:
25+
path: |
26+
~/.cargo/registry
27+
~/.cargo/git
28+
target
29+
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
30+
restore-keys: |
31+
${{ runner.os }}-cargo-registry-
32+
33+
- name: Install Rust toolchain via rustup
34+
run: |
35+
rustup override set nightly
36+
rustup component add clippy --toolchain nightly
37+
rustup component add rustfmt --toolchain nightly
38+
39+
- name: Check lint
40+
run: cargo clippy -- -D warnings
41+
42+
- name: Check formatting
43+
run: cargo fmt -- --check

.github/workflows/publish.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ jobs:
1212
name: Publish to crates.io
1313
runs-on: ubuntu-latest
1414
steps:
15-
- uses: actions/checkout@v3
15+
- uses: actions/checkout@v4
1616
with:
1717
submodules: recursive
1818

.github/workflows/rust.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,12 +15,12 @@ jobs:
1515
runs-on: ubuntu-latest
1616
timeout-minutes: 30
1717
steps:
18-
- uses: actions/checkout@v3
18+
- uses: actions/checkout@v4
1919
with:
2020
submodules: recursive
2121

2222
- name: Cache Cargo registry
23-
uses: actions/cache@v3
23+
uses: actions/cache@v4
2424
with:
2525
path: |
2626
~/.cargo/registry

Cargo.toml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,13 @@
11
[package]
22
name = "uniswap-sdk-core"
3-
version = "0.20.1"
3+
version = "0.21.0"
44
edition = "2021"
55
authors = ["malik <aremumalik05@gmail.com>", "Shuhui Luo <twitter.com/aureliano_law>"]
66
description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange"
77
license = "MIT"
88

99
[dependencies]
10-
alloy-primitives = "0.6"
10+
alloy-primitives = "0.7"
1111
bigdecimal = "=0.4.2"
1212
eth_checksum = { version = "0.1.2", optional = true }
1313
lazy_static = "1.4"

0 commit comments

Comments
 (0)