Skip to content

Commit

Permalink
Merge pull request #37 from striezel-stash/ci-actions-update
Browse files Browse the repository at this point in the history
Update GitHub Actions CI
  • Loading branch information
sburris0 authored Oct 8, 2023
2 parents 91fc66d + 78b29f3 commit e6a01ba
Showing 1 changed file with 15 additions and 47 deletions.
62 changes: 15 additions & 47 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,37 +7,25 @@ jobs:
name: Update
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: update
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo update

check:
name: Check
runs-on: ubuntu-latest
needs: update
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: check
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: cargo check

test:
name: Test Suite
runs-on: ubuntu-latest
needs: update
steps:
- uses: actions/checkout@v2
- uses: actions/checkout@v3
- name: Update apt
run: sudo apt update
- name: Install libudev
Expand All @@ -46,44 +34,24 @@ jobs:
run: sudo apt install libxkbcommon-dev
- name: Install libwayland
run: sudo apt install libwayland-dev
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions-rs/cargo@v1
with:
command: test
- uses: dtolnay/rust-toolchain@stable
- run: cargo test

fmt:
name: Rustfmt
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add rustfmt
- uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
- run: cargo fmt --all -- --check

clippy:
name: Clippy
runs-on: ubuntu-latest
needs: update
steps:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
override: true
- uses: actions/checkout@v3
- uses: dtolnay/rust-toolchain@stable
- run: rustup component add clippy
- uses: actions-rs/cargo@v1
with:
command: clippy
args: -- -D warnings
- run: cargo clippy -- -D warnings

0 comments on commit e6a01ba

Please sign in to comment.