Skip to content

Commit

Permalink
Update GitHub Actions CI (#4)
Browse files Browse the repository at this point in the history
* chore: update github actions ci

* fix(workflow): add missing dashes before -D warnings
  • Loading branch information
negezor authored Mar 26, 2024
1 parent cf916c8 commit 504981d
Showing 1 changed file with 10 additions and 26 deletions.
36 changes: 10 additions & 26 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -15,18 +15,15 @@ jobs:
runs-on: ${{ matrix.platform }}

steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v4
- name: Install ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true

- name: Run cargo check
uses: actions-rs/cargo@v1
with:
command: check
run: cargo check

test:
name: Test Suite
Expand All @@ -37,46 +34,33 @@ jobs:
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4
with:
submodules: true

- name: Install ${{ matrix.toolchain }} toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
override: true

- name: Run cargo test
uses: actions-rs/cargo@v1
with:
command: test
args: --test geoip
run: cargo test --test geoip

lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v2
uses: actions/checkout@v4

- name: Install stable toolchain
uses: actions-rs/toolchain@v1
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: stable
override: true
components: rustfmt, clippy

- name: Run cargo fmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
run: cargo fmt --all --check

- name: Run cargo clippy
uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
run: cargo clippy -- -D warnings

0 comments on commit 504981d

Please sign in to comment.