ci: add optional clippy job
This commit is contained in:
parent
ee12de2e3a
commit
7b0b9f100c
2 changed files with 29 additions and 17 deletions
34
.github/workflows/ci.yml
vendored
34
.github/workflows/ci.yml
vendored
|
@ -1,22 +1,30 @@
|
||||||
name: CI
|
name: Continuous Integration
|
||||||
|
|
||||||
on:
|
on: push
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
branches: [ master ]
|
|
||||||
|
|
||||||
env:
|
env:
|
||||||
CARGO_TERM_COLOR: always
|
CARGO_TERM_COLOR: always
|
||||||
|
|
||||||
jobs:
|
jobs:
|
||||||
build:
|
check:
|
||||||
|
|
||||||
runs-on: ubuntu-latest
|
runs-on: ubuntu-latest
|
||||||
|
name: Check
|
||||||
steps:
|
steps:
|
||||||
- uses: actions/checkout@v2
|
- uses: actions/checkout@v2
|
||||||
- name: Build
|
- name: cargo check
|
||||||
run: cargo build --verbose
|
run: cargo check
|
||||||
- name: Run tests
|
test:
|
||||||
run: cargo test --verbose
|
runs-on: ubuntu-latest
|
||||||
|
name: Test
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v2
|
||||||
|
- name: cargo test
|
||||||
|
run: cargo test
|
||||||
|
# uncomment to enable clippy lints
|
||||||
|
# clippy:
|
||||||
|
# runs-on: ubuntu-latest
|
||||||
|
# name: Lint (clippy)
|
||||||
|
# steps:
|
||||||
|
# - uses: actions/checkout@v2
|
||||||
|
# - name: cargo clippy
|
||||||
|
# run: cargo clippy -- -D warnings
|
||||||
|
|
|
@ -159,6 +159,10 @@ Go to the _Secrets_ tab in your repository settings and create the following sec
|
||||||
> **Note**
|
> **Note**
|
||||||
> 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.
|
> 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.
|
||||||
|
|
||||||
|
### CI: enable clippy lints
|
||||||
|
|
||||||
|
Uncomment the `clippy` job in the `ci.yml` workflow to enable clippy checks in CI.
|
||||||
|
|
||||||
## Useful crates
|
## Useful crates
|
||||||
|
|
||||||
- [itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
|
- [itertools](https://crates.io/crates/itertools): Extends iterators with extra methods and adaptors. Frequently useful for aoc puzzles.
|
||||||
|
|
Loading…
Add table
Reference in a new issue