2022-10-28 05:01:24 +11:00
|
|
|
# Copyright 2019-2022 Tauri Programme within The Commons Conservancy
|
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
name: clippy & fmt
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
concurrency:
|
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
|
|
|
|
|
|
|
jobs:
|
|
|
|
clippy:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
2022-11-24 03:29:52 +11:00
|
|
|
- name: install system deps
|
|
|
|
run: |
|
|
|
|
sudo apt-get update
|
|
|
|
sudo apt-get install -y libgtk-3-dev libxdo-dev libayatana-appindicator3-dev
|
2022-10-28 05:01:24 +11:00
|
|
|
- name: install stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
|
|
|
components: clippy
|
|
|
|
|
2022-11-24 03:29:52 +11:00
|
|
|
- uses: actions-rs/cargo@v1
|
2022-10-28 05:01:24 +11:00
|
|
|
with:
|
2022-11-24 03:29:52 +11:00
|
|
|
command: clippy
|
2022-10-28 05:01:24 +11:00
|
|
|
args: --all-targets --all-features -- -D warnings
|
|
|
|
|
|
|
|
fmt:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: install stable
|
|
|
|
uses: actions-rs/toolchain@v1
|
|
|
|
with:
|
|
|
|
profile: minimal
|
|
|
|
toolchain: stable
|
|
|
|
override: true
|
2022-11-06 23:13:18 +11:00
|
|
|
components: rustfmt
|
2022-10-28 05:01:24 +11:00
|
|
|
|
|
|
|
- uses: actions-rs/cargo@v1
|
|
|
|
with:
|
|
|
|
command: fmt
|
|
|
|
args: --all -- --check
|