2022-12-09 05:50:24 +11:00
|
|
|
# Copyright 2022-2022 Tauri Programme within The Commons Conservancy
|
2022-10-28 05:01:24 +11:00
|
|
|
# SPDX-License-Identifier: Apache-2.0
|
|
|
|
# SPDX-License-Identifier: MIT
|
|
|
|
|
|
|
|
name: clippy & fmt
|
|
|
|
|
|
|
|
on:
|
|
|
|
push:
|
|
|
|
branches:
|
|
|
|
- dev
|
|
|
|
pull_request:
|
|
|
|
|
|
|
|
concurrency:
|
2023-07-26 05:01:35 +10:00
|
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
|
|
cancel-in-progress: true
|
2022-10-28 05:01:24 +11:00
|
|
|
|
|
|
|
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
|
2023-07-26 05:01:35 +10:00
|
|
|
sudo apt-get install -y libgtk-3-dev libxdo-dev libwebkit2gtk-4.1-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
|
2023-07-26 05:01:35 +10:00
|
|
|
args: --all -- --check
|