Add linting
This commit is contained in:
parent
4875ed4359
commit
8ee77f00b7
13
.github/workflows/cli-build.yml
vendored
13
.github/workflows/cli-build.yml
vendored
@ -1,4 +1,4 @@
|
|||||||
name: CLI Build
|
name: CLI Build + Lint
|
||||||
|
|
||||||
on:
|
on:
|
||||||
push:
|
push:
|
||||||
@ -23,13 +23,20 @@ jobs:
|
|||||||
uses: actions/cache@v2
|
uses: actions/cache@v2
|
||||||
with:
|
with:
|
||||||
path: ../target/**
|
path: ../target/**
|
||||||
key: ${{ runner.os }}-build-cache
|
key: ${{ runner.os }}-theseus-cli-${{ hashFiles('Cargo.lock') }}
|
||||||
- name: Install toolchain
|
- name: Install toolchain
|
||||||
uses: actions-rs/toolchain@v1
|
uses: actions-rs/toolchain@v1
|
||||||
with:
|
with:
|
||||||
toolchain: stable
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
- uses: actions-rs/cargo@v1
|
- uses: actions-rs/cargo@v1
|
||||||
name: Build program
|
name: Build program
|
||||||
with:
|
with:
|
||||||
command: build
|
command: build
|
||||||
args: --bin theseus_cli
|
args: --bin theseus_cli
|
||||||
|
- name: Run Lint
|
||||||
|
uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --bin theseus_cli
|
||||||
|
|||||||
37
.github/workflows/lint.yml
vendored
37
.github/workflows/lint.yml
vendored
@ -1,37 +0,0 @@
|
|||||||
name: Clippy
|
|
||||||
|
|
||||||
on:
|
|
||||||
push:
|
|
||||||
branches: [ master ]
|
|
||||||
pull_request:
|
|
||||||
|
|
||||||
env:
|
|
||||||
CARGO_TERM_COLOR: always
|
|
||||||
|
|
||||||
jobs:
|
|
||||||
lint:
|
|
||||||
runs-on: ubuntu-latest
|
|
||||||
steps:
|
|
||||||
- uses: actions/checkout@v2
|
|
||||||
- name: Install toolchain
|
|
||||||
uses: actions-rs/toolchain@v1
|
|
||||||
with:
|
|
||||||
toolchain: stable
|
|
||||||
override: true
|
|
||||||
components: rustfmt, clippy
|
|
||||||
- name: Cache build artifacts
|
|
||||||
id: cache-build
|
|
||||||
uses: actions/cache@v2
|
|
||||||
with:
|
|
||||||
path: target/**
|
|
||||||
key: ${{ runner.os }}-build-cache
|
|
||||||
- name: Theseus Clippy
|
|
||||||
uses: actions-rs/clippy-check@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --bin theseus
|
|
||||||
- name: Theseus CLI Clippy
|
|
||||||
uses: actions-rs/clippy-check@v1
|
|
||||||
with:
|
|
||||||
token: ${{ secrets.GITHUB_TOKEN }}
|
|
||||||
args: --bin theseus_cli
|
|
||||||
33
.github/workflows/tauri-build.yml
vendored
33
.github/workflows/tauri-build.yml
vendored
@ -20,15 +20,40 @@ jobs:
|
|||||||
uses: actions/setup-node@v3
|
uses: actions/setup-node@v3
|
||||||
with:
|
with:
|
||||||
node-version: 16
|
node-version: 16
|
||||||
- name: install Rust stable
|
- name: Install toolchain
|
||||||
uses: dtolnay/rust-toolchain@stable
|
uses: actions-rs/toolchain@v1
|
||||||
|
with:
|
||||||
|
toolchain: stable
|
||||||
|
override: true
|
||||||
|
components: rustfmt, clippy
|
||||||
- name: install dependencies (ubuntu only)
|
- name: install dependencies (ubuntu only)
|
||||||
if: matrix.platform == 'ubuntu-20.04'
|
if: matrix.platform == 'ubuntu-20.04'
|
||||||
run: |
|
run: |
|
||||||
sudo apt-get update
|
sudo apt-get update
|
||||||
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.0-dev libappindicator3-dev librsvg2-dev patchelf
|
||||||
|
- name: Get build cache
|
||||||
|
id: cache-build
|
||||||
|
uses: actions/cache@v2
|
||||||
|
with:
|
||||||
|
path: ../target/**
|
||||||
|
key: ${{ runner.os }}-theseus-gui-${{ hashFiles('Cargo.lock') }}
|
||||||
|
- name: Get yarn cache
|
||||||
|
id: yarn-cache
|
||||||
|
run: echo "::set-output name=dir::$(yarn cache dir)"
|
||||||
|
- uses: actions/cache@v3
|
||||||
|
with:
|
||||||
|
path: ${{ steps.yarn-cache.outputs.dir }}
|
||||||
|
key: ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
|
||||||
|
restore-keys: |
|
||||||
|
${{ runner.os }}-yarn-
|
||||||
- name: install frontend dependencies
|
- name: install frontend dependencies
|
||||||
run: yarn install
|
run: yarn install --immutable --immutable-cache --check-cache
|
||||||
- uses: tauri-apps/tauri-action@v0
|
- uses: tauri-apps/tauri-action@v0
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
- name: Run Lint
|
||||||
|
if: matrix.platform == 'ubuntu-20.04'
|
||||||
|
uses: actions-rs/clippy-check@v1
|
||||||
|
with:
|
||||||
|
token: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
args: --bin theseus_cli
|
||||||
Loading…
x
Reference in New Issue
Block a user