Skip to content

Update rust edition (#7) #43

Update rust edition (#7)

Update rust edition (#7) #43

Workflow file for this run

name: Rust
on: [push, pull_request]
env:
CARGO_TERM_COLOR: always
jobs:
check:
name: Check
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta, nightly]
runs-on: ${{ matrix.platform }}
steps:
- uses: actions/checkout@v4
- name: Install ${{ matrix.toolchain }} toolchain
uses: dtolnay/rust-toolchain@stable
with:
profile: minimal
toolchain: ${{ matrix.toolchain }}
- name: Run cargo check
run: cargo check
test:
name: Test Suite
strategy:
matrix:
platform: [ubuntu-latest, macos-latest, windows-latest]
toolchain: [stable, beta, nightly]
runs-on: ${{ matrix.platform }}
steps:
- name: Checkout sources
uses: actions/checkout@v4
with:
submodules: true
- name: Install ${{ matrix.toolchain }} toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: ${{ matrix.toolchain }}
- name: Run cargo test
run: cargo test --test geoip
lints:
name: Lints
runs-on: ubuntu-latest
steps:
- name: Checkout sources
uses: actions/checkout@v4
- name: Install stable toolchain
uses: dtolnay/rust-toolchain@stable
with:
toolchain: stable
components: rustfmt, clippy
- name: Run cargo fmt
run: cargo fmt --all --check
- name: Run cargo clippy
run: cargo clippy -- -D warnings