forked from dequbed/rust-ldap
-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
77 additions
and
0 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,77 @@ | ||
name: continuous integration | ||
|
||
on: [push, pull_request] | ||
|
||
jobs: | ||
build: | ||
|
||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
matrix: | ||
os: [ubuntu-latest, windows-2019, macOS-latest] | ||
rust: [stable, nightly] | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
- name: Install rust toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
- name: Build | ||
uses: actions-rs/cargo@v1 | ||
# Force to build without warnings | ||
env: | ||
RUSTFLAGS: '-D warnings' | ||
with: | ||
command: build | ||
args: --verbose | ||
- name: Run tests | ||
uses: actions-rs/cargo@v1 | ||
# force to build tests without warnings | ||
env: | ||
RUSTFLAGS: '-D warnings' | ||
with: | ||
command: test | ||
args: --verbose | ||
|
||
rustfmt_check: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
- name: Ensure that rustfmt is installed | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
- name: Run rustfmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: fmt | ||
args: --all -- --check | ||
|
||
clippy_check: | ||
|
||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout code | ||
uses: actions/checkout@v1 | ||
- name: Ensure that clippy is installed | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
- name: Run clippy | ||
uses: actions-rs/clippy-check@v1 | ||
with: | ||
token: ${{ secrets.GITHUB_TOKEN }} | ||
args: --all-targets --all-features | ||
|