-
Notifications
You must be signed in to change notification settings - Fork 4
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
45 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,45 @@ | ||
on: [push] | ||
|
||
name: Continuous Integration | ||
|
||
env: | ||
CARGO_TERM_COLOR: always | ||
RUST_BACKTRACE: full | ||
RUSTFLAGS: "-C link-arg=-fuse-ld=lld -D warnings" | ||
GH_USER: ${{ github.repository_owner }} | ||
GH_TOKEN: ${{ secrets.GH_PRIVATE_TOKEN }} | ||
|
||
jobs: | ||
check: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
- uses: actions/cache@v2 | ||
with: | ||
path: | | ||
~/.cargo/registry | ||
~/.cargo/git | ||
key: check-cargo-${{ hashFiles('**/Cargo.lock') }} | ||
|
||
- uses: actions-rs/toolchain@v1 | ||
with: | ||
profile: minimal | ||
toolchain: stable | ||
override: true | ||
|
||
- name: prepare | ||
run: | | ||
git config --global credential.helper store | ||
git config --global --replace-all url.https://github.com/.insteadOf ssh://[email protected]/ | ||
git config --global --add url.https://github.com/.insteadOf [email protected]: | ||
mkdir ~/.cargo && echo "[net]\ngit-fetch-with-cli = true" > ~/.cargo/config.toml | ||
(echo url=https://github.com; echo "username=${GH_USER}"; echo "password=${GH_TOKEN}"; echo ) | git credential approve | ||
sudo apt-get install -y lld librdkafka-dev libsasl2-dev | ||
rustup component add rustfmt | ||
rustup component add clippy | ||
- run: cargo check | ||
- run: cargo test -- --nocapture | ||
- run: cargo fmt --all -- --check | ||
- run: cargo clippy -- -D warnings |