Skip to content

Commit

Permalink
Merge pull request #32 from dbrgn/ci
Browse files Browse the repository at this point in the history
CI Updates
  • Loading branch information
dbrgn committed Dec 26, 2023
2 parents 0ed1c1c + fc98e76 commit 49fa2c4
Show file tree
Hide file tree
Showing 2 changed files with 29 additions and 34 deletions.
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
version: 2
updates:

# Create PRs for GitHub Actions updates
# src: https://github.com/marketplace/actions/build-and-push-docker-images#keep-up-to-date-with-github-dependabot
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"

# Note: Rust dependencies are not handled here. For those
# dependencies, we want Dependabot only for security updates, which is
# already enabled through GitHub repository settings.
50 changes: 16 additions & 34 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,55 +14,37 @@ jobs:
name: run tests
strategy:
matrix:
rust: [1.64.0, stable]
rust: [1.71.1, stable]
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@master
with:
toolchain: ${{ matrix.rust }}
override: true
- name: Build with default features
uses: actions-rs/cargo@v1
with:
command: build
run: cargo build
- name: Build with all features
uses: actions-rs/cargo@v1
with:
command: build
args: --all-features
run: cargo build --all-features
- name: Run tests
uses: actions-rs/cargo@v1
with:
command: test
args: --all-features
run: cargo test --all-features

clippy:
name: run clippy lints
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.71.1
with:
toolchain: 1.64.0
components: clippy
override: true
- uses: actions-rs/clippy-check@v1
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --all-features
components: clippy
- run: cargo clippy --all-features

fmt:
name: run rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
toolchain: 1.60.0
override: true
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- uses: actions/checkout@v4
- uses: dtolnay/rust-toolchain@1.71.1
with:
components: rustfmt
- run: rustup component add rustfmt
- run: cargo fmt --all -- --check

0 comments on commit 49fa2c4

Please sign in to comment.