1
0
mirror of https://github.com/actix/examples synced 2024-11-30 17:14:35 +01:00
examples/.github/workflows/clippy-fmt.yml

57 lines
1.3 KiB
YAML
Raw Normal View History

2020-09-16 02:11:49 +02:00
name: lint
on:
pull_request:
types: [opened, synchronize, reopened]
jobs:
fmt:
name: rustfmt check
runs-on: ubuntu-latest
steps:
2022-12-11 16:20:19 +01:00
- uses: actions/checkout@v3
2020-09-16 02:11:49 +02:00
- name: Install Rust
2023-07-09 00:02:44 +02:00
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: stable
components: rustfmt
2020-09-16 02:11:49 +02:00
- name: rustfmt
uses: actions-rust-lang/rustfmt@v1
2020-09-16 02:11:49 +02:00
clippy:
name: clippy check
runs-on: ubuntu-latest
2023-03-14 04:24:17 +01:00
env:
CI: 1
CARGO_INCREMENTAL: false
2020-09-16 02:11:49 +02:00
steps:
2022-12-11 16:20:19 +01:00
- uses: actions/checkout@v3
2020-09-16 02:11:49 +02:00
- name: Install Rust
2023-07-09 00:02:44 +02:00
uses: actions-rust-lang/setup-rust-toolchain@v1.5.0
with:
toolchain: stable
components: clippy
2020-09-16 02:11:49 +02:00
# - name: Create test DBs
# run: |
# sudo apt-get update && sudo apt-get install sqlite3
# cargo install sqlx-cli --no-default-features --features=rustls,sqlite
# cd basics/todo
# DATABASE_URL="sqlite://./todo.db" sqlx database create
# chmod a+rwx todo.db
# DATABASE_URL="sqlite://./todo.db" sqlx migrate run
2020-09-16 02:11:49 +02:00
- name: clippy
timeout-minutes: 30
2023-04-23 22:53:40 +02:00
uses: giraffate/clippy-action@v1
2020-09-16 02:11:49 +02:00
with:
2023-04-23 22:53:40 +02:00
reporter: 'github-pr-check'
github_token: ${{ secrets.GITHUB_TOKEN }}
clippy_flags: --workspace --all-features --tests