1
0
mirror of https://github.com/actix/examples synced 2024-11-23 22:41:07 +01:00
examples/.github/workflows/clippy-fmt.yml

67 lines
1.5 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:
- uses: actions/checkout@v2
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: rustfmt
override: true
- name: rustfmt
uses: actions-rs/cargo@v1
with:
command: fmt
args: --all -- --check
clippy:
name: clippy check
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- name: cache cargo artifacts
uses: actions/cache@v2
with:
path: |
~/.cargo/registry
~/.cargo/git
./target/debug
key: cargo-clippy-${{ matrix.version }}-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
cargo-clippy-${{ matrix.version }}-
- uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
components: clippy
override: true
2021-03-03 15:37:17 +01:00
- name: create test db for sqlx
run: |
sudo apt-get update && sudo apt-get install sqlite3
cd database_interactions/sqlx_todo
cp .env.example .env
cat schema.sql | sqlite3 test.db
chmod a+rwx test.db
2020-09-16 02:11:49 +02:00
- name: clippy
uses: actions-rs/clippy-check@v1
timeout-minutes: 30
with:
token: ${{ secrets.GITHUB_TOKEN }}
args: --workspace --all-features --tests