Skip to content

Commit 7e380c6

Browse files
committed
refactor: Use GitHub actions workflows of tests also for linter
1 parent fd2d26c commit 7e380c6

File tree

4 files changed

+36
-88
lines changed

4 files changed

+36
-88
lines changed

.github/workflows/rust-check-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -43,3 +43,21 @@ jobs:
4343
run: cargo test --verbose -- --show-output --ignored
4444
- name: Dry run publish
4545
run: cargo publish --dry-run --verbose
46+
lint:
47+
runs-on: ubuntu-latest
48+
timeout-minutes: 5
49+
steps:
50+
- uses: actions/checkout@v2
51+
- uses: actions-rs/toolchain@v1
52+
with:
53+
toolchain: stable
54+
override: true
55+
components: rustfmt, clippy
56+
- uses: actions-rs/clippy-check@v1
57+
with:
58+
token: ${{ secrets.GITHUB_TOKEN }}
59+
args: --all-features
60+
- name: Run lint
61+
run: cargo clippy --verbose -- -D warnings
62+
- name: Run fmt
63+
run: cargo fmt --verbose --all -- --check

.github/workflows/rust-lint-fmt.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

.github/workflows/rust-nightly-check-test.yml

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -47,3 +47,21 @@ jobs:
4747
run: cargo test --verbose -- --show-output --ignored
4848
- name: Dry run publish
4949
run: cargo publish --dry-run --verbose
50+
lint:
51+
runs-on: ubuntu-latest
52+
timeout-minutes: 5
53+
steps:
54+
- uses: actions/checkout@v2
55+
- uses: actions-rs/toolchain@v1
56+
with:
57+
toolchain: nightly
58+
override: true
59+
components: rustfmt, clippy
60+
- uses: actions-rs/clippy-check@v1
61+
with:
62+
token: ${{ secrets.GITHUB_TOKEN }}
63+
args: --all-features
64+
- name: Run lint
65+
run: cargo clippy --verbose -- -D warnings
66+
- name: Run fmt
67+
run: cargo fmt --verbose --all -- --check

.github/workflows/rust-nightly-lint-fmt.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

0 commit comments

Comments
 (0)