Skip to content

Commit 7b0b9f1

Browse files
committed
ci: add optional clippy job
1 parent ee12de2 commit 7b0b9f1

File tree

2 files changed

+29
-17
lines changed

2 files changed

+29
-17
lines changed

.github/workflows/ci.yml

Lines changed: 25 additions & 17 deletions
Original file line numberDiff line numberDiff line change
@@ -1,22 +1,30 @@
1-
name: CI
1+
name: Continuous Integration
22

3-
on:
4-
push:
5-
branches: [ master ]
6-
pull_request:
7-
branches: [ master ]
3+
on: push
84

95
env:
10-
CARGO_TERM_COLOR: always
6+
CARGO_TERM_COLOR: always
117

128
jobs:
13-
build:
14-
15-
runs-on: ubuntu-latest
16-
17-
steps:
18-
- uses: actions/checkout@v2
19-
- name: Build
20-
run: cargo build --verbose
21-
- name: Run tests
22-
run: cargo test --verbose
9+
check:
10+
runs-on: ubuntu-latest
11+
name: Check
12+
steps:
13+
- uses: actions/checkout@v2
14+
- name: cargo check
15+
run: cargo check
16+
test:
17+
runs-on: ubuntu-latest
18+
name: Test
19+
steps:
20+
- uses: actions/checkout@v2
21+
- name: cargo test
22+
run: cargo test
23+
# uncomment to enable clippy lints
24+
# clippy:
25+
# runs-on: ubuntu-latest
26+
# name: Lint (clippy)
27+
# steps:
28+
# - uses: actions/checkout@v2
29+
# - name: cargo clippy
30+
# run: cargo clippy -- -D warnings

README.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -159,6 +159,10 @@ Go to the _Secrets_ tab in your repository settings and create the following sec
159159
> **Note**
160160
> The session cookie might expire after a while (~1 month) which causes the automated workflow to fail. To fix this issue, refresh the `AOC_SESSION` secret.
161161
162+
### CI: enable clippy lints
163+
164+
Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI.
165+
162166
## Useful crates
163167

164168
- [itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.

0 commit comments

Comments
 (0)