fix: add missing code #373
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: lint | |
on: | |
push: | |
tags: | |
- '*' | |
branches: | |
- '*' | |
pull_request: | |
types: | |
- opened | |
branches: | |
- 'release**' | |
- 'canary**' | |
- 'main' | |
jobs: | |
ts-lint: | |
runs-on: ubuntu-latest | |
steps: | |
# Setup Node.js | |
- name: setup node | |
uses: actions/[email protected] | |
with: | |
node-version: 20 | |
# checkout | |
- name: checkout source | |
uses: actions/[email protected] | |
- name: yarn installation | |
run: yarn install | |
- name: lint TS | |
run: yarn lint | |
rust-lint: | |
runs-on: macos-latest | |
steps: | |
# - uses: awalsh128/cache-apt-pkgs-action@latest | |
# with: | |
# packages: build-essential lld pkg-config libclang-dev libwebkit2gtk-4.0-dev libglib2.0-* libssl-dev libgtk-3-dev libappindicator3-dev patchelf librsvg2-dev libvips-dev libgmp-dev | |
# version: 1.0 | |
- name: checkout sources | |
uses: actions/[email protected] | |
with: | |
fetch-depth: 0 | |
- name: Set rust_version from rust_toolchain file | |
run: echo "RUST_VERSION=$(cat src-tauri/rust-toolchain)" >> $GITHUB_ENV | |
- uses: actions-rs/[email protected] | |
with: | |
profile: minimal | |
toolchain: ${{ env.RUST_VERSION }} | |
override: true | |
- name: install rustfmt clippy | |
shell: bash | |
run: rustup component add rustfmt clippy | |
- name: cache rust | |
uses: Swatinem/rust-cache@v2 | |
with: | |
shared-key: 'libra' # to share across CI builds, so it is not job-id specific | |
cache-on-failure: true | |
- name: check format | |
working-directory: ./src-tauri | |
run: cargo fmt --all -- --check | |
- name: lint | |
working-directory: ./src-tauri | |
run: cargo clippy --workspace --tests -- -D warnings |