diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..2862354 --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,5 @@ +version: 2 +updates: + - package-ecosystem: "cargo" + schedule: + interval: "daily" diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml new file mode 100644 index 0000000..36a9d2c --- /dev/null +++ b/.github/workflows/rust.yml @@ -0,0 +1,49 @@ +name: Rust + +on: + push: + branches: [ "master" ] + pull_request: + branches: [ "master" ] + +env: + CARGO_TERM_COLOR: always + +jobs: + lint: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + components: rustfmt,clippy + - uses: Swatinem/rust-cache@v2 + - name: Formatting + run: cargo fmt --check --all + - name: Linting + run: cargo clippy --all --tests + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + - uses: Swatinem/rust-cache@v2 + - run: cargo test + + build: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v3 + - uses: actions-rs/toolchain@v1 + with: + toolchain: stable + profile: minimal + - uses: Swatinem/rust-cache@v2 + - name: Build + run: cargo build