Skip to content

Commit

Permalink
Add CI
Browse files Browse the repository at this point in the history
  • Loading branch information
Theodus committed Aug 16, 2023
1 parent e6ff888 commit 2a3bbd4
Showing 1 changed file with 45 additions and 0 deletions.
45 changes: 45 additions & 0 deletions .github/workflows/ci.yml
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

0 comments on commit 2a3bbd4

Please sign in to comment.