Skip to content

Bump tokio from 1.37.0 to 1.38.0 #280

Bump tokio from 1.37.0 to 1.38.0

Bump tokio from 1.37.0 to 1.38.0 #280

Workflow file for this run

name: Rust test & lint
on:
push:
branches: '*'
pull_request:
jobs:
check:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Install Rust
run: |
rustup toolchain install 1.70 --profile minimal --no-self-update --component rustfmt clippy
rustup default 1.70
- name: Cache GeoIP database
id: cache-geoip
uses: actions/cache@v4
with:
path: var
key: static-geoip
- name: Download GeoIP database
if: steps.cache-geoip.outputs.cache-hit != 'true'
run: curl -s https://download.db-ip.com/free/dbip-country-lite-$(date +%Y-%m).mmdb.gz | zcat > var/geoip-country.mmdb
- name: Cache cargo registry
uses: actions/cache@v3
with:
path: ~/.cargo/registry
key: ${{ runner.os }}-cargo-registry-${{ hashFiles('**/Cargo.lock') }}
- name: Cache cargo build
uses: actions/cache@v4
with:
path: target
key: ${{ runner.os }}-cargo-build-target-${{ hashFiles('**/Cargo.lock') }}
- name: Execute all unit and integration tests and build examples
run: cargo test -- --test-threads=1
env:
GEOIP_MMDB: var/geoip-country.mmdb
ROCKET_DATABASES: '{directory={url="var/directory.sqlite"}}'
- name: Check formatting of code and suggest improvements
run: cargo fmt -- --check
- name: Check for common mistakes and code improvements
run: cargo clippy --all-targets --all-features -- -D warnings
- name: Remove SQLite database, to prevent it getting cached
run: rm var/directory.sqlite