mirror of
https://github.com/NetworkCats/rustyip.git
synced 2026-11-13 16:17:46 +00:00
44 lines
890 B
YAML
44 lines
890 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [main]
|
|
pull_request:
|
|
branches: [main]
|
|
|
|
env:
|
|
CARGO_TERM_COLOR: always
|
|
|
|
jobs:
|
|
check:
|
|
name: Check
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout repository
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Install Rust toolchain
|
|
uses: dtolnay/rust-toolchain@master
|
|
with:
|
|
toolchain: "1.92"
|
|
components: rustfmt, clippy
|
|
|
|
- name: Cache Cargo artifacts
|
|
uses: Swatinem/rust-cache@v2
|
|
|
|
- name: Download MMDB database
|
|
run: |
|
|
mkdir -p data
|
|
curl -fsSL -o data/Merged-IP.mmdb \
|
|
"https://github.com/NetworkCats/Merged-IP-Data/releases/latest/download/Merged-IP.mmdb"
|
|
|
|
- name: Check formatting
|
|
run: cargo fmt --check
|
|
|
|
- name: Run Clippy
|
|
run: cargo clippy -- -D warnings
|
|
|
|
- name: Run tests
|
|
run: cargo test
|