-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
* add github ci step * remove +nightly from rustfmt
- Loading branch information
1 parent
f61cecf
commit 9eadfa8
Showing
2 changed files
with
151 additions
and
1 deletion.
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,150 @@ | ||
name: CI | ||
|
||
on: | ||
push: | ||
branches: | ||
- main | ||
paths-ignore: | ||
- '**.md' | ||
pull_request: | ||
paths-ignore: | ||
- '**.md' | ||
|
||
jobs: | ||
check: | ||
name: Check | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Run cargo check | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: check | ||
|
||
coverage: | ||
name: Coverage | ||
strategy: | ||
matrix: | ||
os: [ubuntu-latest] | ||
rust: [stable] | ||
runs-on: ${{ matrix.os }} | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: ${{ matrix.rust }} | ||
override: true | ||
components: llvm-tools-preview | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Download grcov | ||
run: | | ||
mkdir -p "${HOME}/.local/bin" | ||
curl -sL https://github.com/mozilla/grcov/releases/download/v0.8.10/grcov-x86_64-unknown-linux-gnu.tar.bz2 | tar jxf - -C "${HOME}/.local/bin" | ||
echo "$HOME/.local/bin" >> $GITHUB_PATH | ||
- name: Run xtask coverage | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: xtask | ||
args: coverage | ||
|
||
- name: Upload to codecov.io | ||
uses: codecov/codecov-action@v3 | ||
with: | ||
files: coverage/*.lcov | ||
|
||
test: | ||
name: Test Suite | ||
runs-on: ${{ matrix.os }} | ||
strategy: | ||
fail-fast: false | ||
matrix: | ||
os: [ ubuntu-latest, macos-latest, windows-latest ] | ||
rust: [stable] | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Run test | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: xtask | ||
args: test | ||
|
||
clippy: | ||
name: clippy | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: clippy | ||
|
||
- name: Run clippy | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: xtask | ||
args: clippy | ||
|
||
fmt: | ||
name: fmt | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout sources | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install stable toolchain | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
components: rustfmt | ||
|
||
- name: Run fmt | ||
uses: actions-rs/cargo@v1 | ||
with: | ||
command: xtask | ||
args: fmt | ||
|
||
docs: | ||
name: Docs | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v2 | ||
|
||
- name: Install Rust | ||
uses: actions-rs/toolchain@v1 | ||
with: | ||
toolchain: stable | ||
profile: minimal | ||
override: true | ||
- uses: Swatinem/rust-cache@v1 | ||
|
||
- name: Check documentation | ||
env: | ||
RUSTDOCFLAGS: -D warnings | ||
run: cargo doc --workspace --all-features --no-deps --document-private-items |
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