Merge branch 'master' into gitoxide #3
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: Clippy, Format & Test | |
on: [pull_request, push, workflow_dispatch] | |
jobs: | |
fmt: | |
name: rustfmt | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: rustfmt | |
- name: Check formatting | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --all -- --check | |
- name: Check formatting in example_project | |
uses: actions-rs/cargo@v1 | |
with: | |
command: fmt | |
args: --manifest-path=example_project/Cargo.toml --all -- --check | |
check: | |
name: cargo check | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Check | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --no-default-features | |
- name: Check cargo-lock | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --no-default-features --features cargo-lock | |
- name: Check git2 | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --no-default-features --features git2 | |
- name: Check semver | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --no-default-features --features semver | |
- name: Check chrono | |
uses: actions-rs/cargo@v1 | |
with: | |
command: check | |
args: --no-default-features --features chrono | |
clippy: | |
name: cargo clippy | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
components: clippy | |
- name: Clippy | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all --tests -- -D warnings | |
- name: Clippy with all features (git2) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --features=chrono,git2,semver --all --tests -- -D warnings | |
- name: Clippy with all features (gitoxide) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --all-features --all --tests -- -D warnings | |
- name: Clippy example_project | |
uses: actions-rs/cargo@v1 | |
with: | |
command: clippy | |
args: --manifest-path=example_project/Cargo.toml -- -D warnings | |
test: | |
name: cargo test | |
strategy: | |
matrix: | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
runs-on: ${{ matrix.os }} | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: actions-rs/toolchain@v1 | |
with: | |
profile: minimal | |
toolchain: stable | |
override: true | |
- name: Test | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
- name: Test with all features (git2) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --features=chrono,git2,semver | |
- name: Test with all features (gitoxide) | |
uses: actions-rs/cargo@v1 | |
with: | |
command: test | |
args: --all-features | |
- name: Run example_project | |
uses: actions-rs/cargo@v1 | |
with: | |
command: run | |
args: --manifest-path=example_project/Cargo.toml |