Skip to content

Update eslint monorepo to v10 #7113

Update eslint monorepo to v10

Update eslint monorepo to v10 #7113

Workflow file for this run

name: "test"
on:
push:
branches:
- '**'
tags-ignore:
- 'v**'
jobs:
test-build:
name: Test & Build
strategy:
fail-fast: false
matrix:
platform: [macos-latest, ubuntu-latest, windows-latest]
runs-on: ${{ matrix.platform }}
steps:
# Prepare
- name: 🔥 Checkout code
uses: actions/checkout@v6
- name: 🧹 Free Disk Space (Ubuntu)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo rm -rf /usr/share/dotnet
sudo rm -rf /usr/local/lib/android
sudo rm -rf /opt/ghc
sudo rm -rf /opt/hostedtoolcache/CodeQL
sudo docker image prune --all --force
- name: 🛠️ Install nodejs 24
uses: actions/setup-node@v6
with:
node-version: 24
- name: 🛠️ Install rust stable
uses: actions-rs/toolchain@v1
with:
profile: minimal
toolchain: stable
- name: 💾 Cache rust dependencies
uses: Swatinem/rust-cache@v2
- name: 💾 Cache javascript dependencies
uses: actions/cache@v5
with:
path: '**/node_modules'
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
- name: 🛠️ Install tauri-cli
run: |
cargo install tauri-cli
- name: 🛠️ Install tarpaulin (rust code coverage analyser)
if: matrix.platform == 'ubuntu-latest'
run: |
curl -L --proto '=https' --tlsv1.2 -sSf https://raw.githubusercontent.com/cargo-bins/cargo-binstall/main/install-from-binstall-release.sh | bash
cargo binstall -y --force cargo-tarpaulin
- name: 🛠️ Install webkit2gtk (for tauri)
if: matrix.platform == 'ubuntu-latest'
run: |
sudo apt-get update
sudo apt-get install -y libwebkit2gtk-4.1-dev libgtksourceview-3.0-dev libsoup-3.0-dev libjavascriptcoregtk-4.1-dev liblua5.4-dev libfuse2 file patchelf librsvg2-dev
- name: 🛠️ Install Lua 5.4 (macOS)
if: matrix.platform == 'macos-latest'
run: |
brew update
brew install lua@5.4 pkg-config
echo "PKG_CONFIG_PATH=$(brew --prefix lua@5.4)/lib/pkgconfig:${PKG_CONFIG_PATH:-}" >> $GITHUB_ENV
- name: 🛠️ Install Lua 5.4 (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
choco install -y pkgconfiglite
& "C:\vcpkg\vcpkg.exe" install lua:x64-windows
$vcpkgRoot = 'C:\vcpkg\installed\x64-windows'
$pkgconfigDir = "$vcpkgRoot\lib\pkgconfig"
if (Test-Path "$pkgconfigDir\lua.pc") { Copy-Item "$pkgconfigDir\lua.pc" "$pkgconfigDir\lua54.pc" }
# Use forward slashes for PKG_CONFIG_PATH to avoid drive letter confusion
$pkgConfigPath = $pkgconfigDir -replace '\\', '/'
Add-Content -Path $env:GITHUB_ENV -Value "PKG_CONFIG_PATH=$pkgConfigPath"
# Set explicit LUA environment variables as fallback for mlua
Add-Content -Path $env:GITHUB_ENV -Value "LUA_INC=$vcpkgRoot\include"
Add-Content -Path $env:GITHUB_ENV -Value "LUA_LIB=$vcpkgRoot\lib"
Add-Content -Path $env:GITHUB_ENV -Value "LUA_LIB_NAME=lua"
# Add Lua bin directory to PATH so build scripts can find lua.dll
Add-Content -Path $env:GITHUB_PATH -Value "$vcpkgRoot\bin"
$pkgconfigBin = Join-Path $env:ChocolateyInstall 'lib\pkgconfiglite\tools'
Add-Content -Path $env:GITHUB_PATH -Value $pkgconfigBin
- name: 🔧 Configure mlua vendored build (Windows)
if: matrix.platform == 'windows-latest'
shell: pwsh
run: |
Add-Content -Path $env:GITHUB_ENV -Value "MLUA_BUILD_LUA=1"
# Javascript
- name: 🛠️ Install nodejs dependencies
run: |
cd app; yarn
- name: 🏗️ Build javascript code
run: |
cd app; yarn build:web
- name: 🧪 Lint javascript code
run: |
cd app; yarn lint
- name: 🧪 Test javascript code
run: |
cd app; yarn test:coverage
# Rust
- name: 🏗️ Build rust code
env:
TAURI_SIGNING_PRIVATE_KEY: ${{ secrets.TAURI_PRIVATE_KEY }}
TAURI_SIGNING_PRIVATE_KEY_PASSWORD: ${{ secrets.TAURI_KEY_PASSWORD }}
APPIMAGE_EXTRACT_AND_RUN: 1
# Disable incremental compilation to prevent LNK1123/CVT1100 errors on Windows
CARGO_INCREMENTAL: 0
run: |
cd app; yarn tauri:build
- name: 🧹 Clean release artifacts
if: matrix.platform == 'ubuntu-latest'
run: |
rm -rf target/release
- name: 🧪 Test rust code
if: matrix.platform == 'ubuntu-latest'
run: |
cargo tarpaulin --verbose --all-features --workspace --timeout 120 --out Xml
- name: 🧪 Lint rust code
continue-on-error: true
run: |
cd app; yarn cargo:clippy
# Upload coverage
- name: 📤 Upload coverage reports to codecov.io
if: matrix.platform == 'ubuntu-latest' && github.ref == 'refs/heads/master'
uses: codecov/codecov-action@v5
continue-on-error: true
with:
fail_ci_if_error: false
files: ./app/coverage/cobertura-coverage.xml,./cobertura.xml,./target/tarpaulin/coverage.json