Skip to content

run clippy::pedantic with stable, too #361

run clippy::pedantic with stable, too

run clippy::pedantic with stable, too #361

Workflow file for this run

name: Rust
on:
push:
branches:
- "**"
pull_request:
branches: [ main ]
env:
CARGO_TERM_COLOR: always
jobs:
check:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: get rust version
id: rustc_version
run: echo ::set-output name=version::$(rustc --version)
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ steps.rustc_version.version }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-
${{ runner.os }}-cargo-
- name: check formatting
run: cargo fmt --all -- --check
- name: compiler check
run: cargo check --tests --examples
- name: tests
run: cargo test --verbose
- name: linter
run: cargo clippy -- -D warnings
- name: run the pedantic linter (warnings only)
run: cargo clippy --color=always --all-targets -- -W clippy::pedantic
build:
needs: check
strategy:
matrix:
os: [ ubuntu-latest, macos-latest ]
runs-on: ${{ matrix.os }}
steps:
- uses: actions/checkout@v2
- name: get rust version
id: rustc_version
run: echo ::set-output name=version::$(rustc --version)
- uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
target
key: ${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-${{ steps.rustc_version.version }}
restore-keys: |
${{ runner.os }}-cargo-${{ hashFiles('Cargo.lock') }}-
${{ runner.os }}-cargo-
- run: cargo build --release
- run: mv target/release/schema2000{,_${{ runner.os }}}
- name: Archive code coverage results
uses: actions/upload-artifact@v2
with:
name: schema2000
path: target/release/schema2000_${{ runner.os }}