Add offline-to-specified option #29
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: test | |
on: | |
push: | |
branches: [ "master" ] | |
pull_request: | |
branches: [ "master" ] | |
env: | |
CARGO_TERM_COLOR: always | |
jobs: | |
build: | |
name: Build and Test | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- uses: actions-rust-lang/setup-rust-toolchain@v1 | |
with: | |
toolchain: nightly | |
components: rustfmt, clippy, llvm-tools-preview | |
- run: cargo install grcov cargo-audit | |
- name: Run tests | |
run: cargo test --no-fail-fast -- --nocapture | |
env: | |
RUSTFLAGS: '-Cinstrument-coverage' | |
RUST_BACKTRACE: full | |
- name: Run grcov | |
run: grcov . --binary-path target/debug/deps/ -s . -t lcov --ignore-not-existing --ignore '../**' --ignore '/*' -o ./lcov.info | |
- name: Coveralls upload | |
uses: coverallsapp/github-action@master | |
with: | |
github-token: ${{ secrets.GITHUB_TOKEN }} | |
path-to-lcov: ./lcov.info | |
- name: Run clippy | |
run: cargo clippy -- -D warnings | |
- name: Run formatting | |
run: cargo fmt --all -- --check | |
- name: Run audit | |
run: cargo audit | |
- name: Build release | |
run: cargo build --release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: uuid-remapper-x86_64-linux | |
path: target/release/uuid-remapper | |
windows: | |
name: Windows | |
runs-on: windows-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: uuid-remapper-x86_64-windows | |
path: target/release/uuid-remapper.exe | |
macos: | |
name: macOS | |
runs-on: macos-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Set up Rust | |
uses: actions-rs/toolchain@v1 | |
with: | |
toolchain: nightly | |
override: true | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Build | |
uses: actions-rs/cargo@v1 | |
with: | |
command: build | |
args: --release | |
- name: Upload artifact | |
uses: actions/upload-artifact@v2 | |
with: | |
name: uuid-remapper-x86_64-macos | |
path: target/release/uuid-remapper |