fix: resolve TypeScript errors and unused code in frontend #33
This file contains hidden or 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: "CI" | |
| on: | |
| push: | |
| branches: [main, master] | |
| pull_request: | |
| branches: [main, master] | |
| jobs: | |
| test: | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| platform: [ubuntu-latest, windows-latest, macos-latest] | |
| runs-on: ${{ matrix.platform }} | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: setup node | |
| uses: actions/setup-node@v4 | |
| with: | |
| node-version: 22 | |
| - name: install Rust stable | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Rust Cache | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: "src-tauri -> target" | |
| - name: install dependencies (ubuntu only) | |
| if: runner.os == 'Linux' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| build-essential \ | |
| curl \ | |
| wget \ | |
| file \ | |
| libssl-dev \ | |
| libgtk-3-dev \ | |
| libayatana-appindicator3-dev \ | |
| librsvg2-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| libjavascriptcoregtk-4.1-dev \ | |
| libsoup-3.0-dev \ | |
| libxdo-dev \ | |
| libcairo2-dev \ | |
| libpango1.0-dev \ | |
| libgdk-pixbuf2.0-dev \ | |
| libglib2.0-dev \ | |
| patchelf \ | |
| pkg-config | |
| - name: diagnostic (ubuntu only) | |
| if: runner.os == 'Linux' | |
| env: | |
| PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_PATH_x86_64_unknown_linux_gnu: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: "1" | |
| PKG_CONFIG_ALLOW_SYSTEM_LIBS: "1" | |
| run: | | |
| echo "Checking for gdk-3.0.pc..." | |
| find /usr -name gdk-3.0.pc | |
| pkg-config --debug --modversion gdk-3.0 | |
| - name: install frontend dependencies | |
| run: npm install --prefer-offline | |
| - name: typecheck frontend | |
| run: npx tsc --noEmit | |
| - name: build frontend | |
| run: npm run build | |
| - name: check Rust | |
| working-directory: src-tauri | |
| env: | |
| PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_PATH_x86_64_unknown_linux_gnu: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: "1" | |
| PKG_CONFIG_ALLOW_SYSTEM_LIBS: "1" | |
| run: cargo check | |
| - name: clippy Rust | |
| working-directory: src-tauri | |
| env: | |
| PKG_CONFIG_PATH: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_PATH_x86_64_unknown_linux_gnu: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_LIBDIR_x86_64_unknown_linux_gnu: /usr/lib/x86_64-linux-gnu/pkgconfig:/usr/lib/pkgconfig:/usr/share/pkgconfig | |
| PKG_CONFIG_ALLOW_SYSTEM_CFLAGS: "1" | |
| PKG_CONFIG_ALLOW_SYSTEM_LIBS: "1" | |
| run: cargo clippy -- -D warnings |