update dependencies and fix clippy errors #290
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Continuous Integration | |
on: | |
push: | |
branches: [ master ] | |
paths: [ 'src/**.rs', 'Cargo.lock', 'Cargo.toml' ] | |
pull_request: | |
branches: [ master ] | |
schedule: | |
- cron: 42 0 7 * * | |
jobs: | |
build: | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
os: [macos-latest, windows-latest, ubuntu-latest] | |
include: | |
- os: windows-latest | |
binary_path: target/debug/dezoomify-rs.exe | |
- os: macos-latest | |
binary_path: target/debug/dezoomify-rs | |
- os: ubuntu-latest | |
binary_path: target/debug/dezoomify-rs | |
steps: | |
- uses: actions/checkout@v3 | |
- name: Cache cargo dependencies | |
uses: actions/cache@v3 | |
with: | |
path: | | |
~/.cargo/registry | |
~/.cargo/git | |
target | |
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }} | |
- run: cargo build --locked | |
- uses: actions/upload-artifact@v3 | |
with: | |
name: dezoomify-rs ${{ matrix.os }} | |
path: ${{ matrix.binary_path }} | |
- run: cargo test | |
env: | |
RUST_BACKTRACE: 1 | |
- run: cargo bench | |
env: | |
RUST_BACKTRACE: 1 | |
- run: rustup component add clippy | |
- run: cargo clippy --tests -- -D warnings |