* Make sure we always reset the code on important steps no matter what the user did to it * Convert comments in codeManager to JSDoc comments so they appear in diagnostics * Was using the wrong codeManager callback * Make sure editorView is available before resetting code * Add Playwright test that shows the code being reset * Fix up text that looks like linksÏ * fmt * Skip test on MacOS, make test more reliable on Chrome * Update cargo-clippy to run based on paths on PRs as well * playw fix * try keep reports * add fix me * try one last thing * fmt --------- Co-authored-by: Kurt Hutten <k.hutten@protonmail.ch>
68 lines
1.8 KiB
YAML
68 lines
1.8 KiB
YAML
on:
|
|
push:
|
|
branches:
|
|
- main
|
|
paths:
|
|
- '**/Cargo.toml'
|
|
- '**/Cargo.lock'
|
|
- '**/rust-toolchain.toml'
|
|
- '**.rs'
|
|
- .github/workflows/cargo-clippy.yml
|
|
pull_request:
|
|
paths:
|
|
- '**/Cargo.toml'
|
|
- '**/Cargo.lock'
|
|
- '**/rust-toolchain.toml'
|
|
- '**.rs'
|
|
- .github/workflows/cargo-clippy.yml
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }}
|
|
cancel-in-progress: true
|
|
name: cargo clippy
|
|
jobs:
|
|
cargoclippy:
|
|
name: cargo clippy
|
|
runs-on: ubuntu-latest
|
|
strategy:
|
|
matrix:
|
|
dir: ['src/wasm-lib', 'src-tauri']
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- name: Install latest rust
|
|
uses: actions-rs/toolchain@v1
|
|
with:
|
|
toolchain: stable
|
|
override: true
|
|
components: clippy
|
|
|
|
- name: install dependencies
|
|
if: matrix.dir == 'src-tauri'
|
|
shell: bash
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y \
|
|
libgtk-3-dev \
|
|
libayatana-appindicator3-dev \
|
|
webkit2gtk-driver \
|
|
libsoup-3.0-dev \
|
|
libjavascriptcoregtk-4.1-dev \
|
|
libwebkit2gtk-4.1-dev \
|
|
at-spi2-core \
|
|
xvfb
|
|
yarn install
|
|
yarn build:wasm
|
|
yarn build:local
|
|
|
|
- name: Rust Cache
|
|
uses: Swatinem/rust-cache@v2.6.1
|
|
|
|
- name: Run clippy
|
|
run: |
|
|
cd "${{ matrix.dir }}"
|
|
cargo clippy --all --tests --benches -- -D warnings
|
|
# If this fails, run "cargo check" to update Cargo.lock,
|
|
# then add Cargo.lock to the PR.
|
|
- name: Check Cargo.lock doesn't need updating
|
|
run: |
|
|
cargo check --locked || echo "Pls run cargo check and commit the changed Cargo.lock"
|