Skip to content

Commit

Permalink
chore: Update GitHub Actions and dependencies (#61)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
shuhuiluo authored Apr 1, 2024
1 parent 4fabfa8 commit 86711ce
Show file tree
Hide file tree
Showing 4 changed files with 48 additions and 50 deletions.
88 changes: 43 additions & 45 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
@@ -1,45 +1,43 @@
name: Rust Linting

on:
push:
branches:
- master
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Rust Lint Check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
with:
submodules: recursive

- name: Cache Cargo registry
uses: actions/cache@v3
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Install Rust toolchain
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: nightly
override: true
components: rustfmt, clippy

- name: Check lint
run: cargo clippy -- -D warnings

- name: Check formatting
run: cargo fmt -- --check
name: Rust Linting

on:
push:
branches:
- master
pull_request:

env:
CARGO_TERM_COLOR: always

jobs:
lint:
name: Rust Lint Check
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache Cargo registry
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-registry-
- name: Install Rust toolchain via rustup
run: |
rustup override set nightly
rustup component add clippy --toolchain nightly
rustup component add rustfmt --toolchain nightly
- name: Check lint
run: cargo clippy -- -D warnings

- name: Check formatting
run: cargo fmt -- --check
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ jobs:
name: Publish to crates.io
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,12 +15,12 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 30
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
submodules: recursive

- name: Cache Cargo registry
uses: actions/cache@v3
uses: actions/cache@v4
with:
path: |
~/.cargo/registry
Expand Down
4 changes: 2 additions & 2 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,13 +1,13 @@
[package]
name = "uniswap-sdk-core"
version = "0.20.1"
version = "0.21.0"
edition = "2021"
authors = ["malik <[email protected]>", "Shuhui Luo <twitter.com/aureliano_law>"]
description = "The Uniswap SDK Core in Rust provides essential functionality for interacting with the Uniswap decentralized exchange"
license = "MIT"

[dependencies]
alloy-primitives = "0.6"
alloy-primitives = "0.7"
bigdecimal = "=0.4.2"
eth_checksum = { version = "0.1.2", optional = true }
lazy_static = "1.4"
Expand Down

0 comments on commit 86711ce

Please sign in to comment.