refactor: streamline CI workflows by removing Python pip/venv caches, simplifying uv setup, and consolidating formatting checks.
This commit is contained in:
@@ -65,9 +65,9 @@ jobs:
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
client/src-tauri/target/
|
||||
key: ${{ runner.os }}-${{ matrix.target }}-cargo-${{ hashFiles('client/src-tauri/Cargo.lock') }}
|
||||
key: ${{ runner.os }}-cargo-${{ matrix.target }}-${{ hashFiles('client/src-tauri/Cargo.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-${{ matrix.target }}-cargo-
|
||||
${{ runner.os }}-cargo-${{ matrix.target }}-
|
||||
${{ runner.os }}-cargo-
|
||||
|
||||
- name: Install frontend dependencies
|
||||
|
||||
@@ -22,18 +22,6 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
pyproject.toml
|
||||
uv.lock
|
||||
|
||||
- name: Restore Python venv cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .venv
|
||||
key: ${{ runner.os }}-py${{ env.PYTHON_VERSION }}-venv-${{ hashFiles('pyproject.toml', 'uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-py${{ env.PYTHON_VERSION }}-venv-
|
||||
|
||||
- name: Restore uv cache
|
||||
uses: actions/cache@v4
|
||||
@@ -50,12 +38,8 @@ jobs:
|
||||
|
||||
- name: Install Python dependencies
|
||||
run: |
|
||||
if [ ! -d ".venv" ]; then
|
||||
python -m pip install --upgrade pip uv
|
||||
uv venv .venv
|
||||
else
|
||||
python -m pip install --upgrade pip uv
|
||||
fi
|
||||
python -m pip install --upgrade uv
|
||||
uv venv .venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -e ".[dev,all]"
|
||||
|
||||
|
||||
@@ -75,7 +75,7 @@ jobs:
|
||||
~/.cargo/registry/cache/
|
||||
~/.cargo/git/db/
|
||||
client/src-tauri/target/
|
||||
key: ${{ runner.os }}-cargo-proto-${{ hashFiles('client/src-tauri/Cargo.lock') }}
|
||||
key: ${{ runner.os }}-cargo-${{ hashFiles('client/src-tauri/Cargo.lock') }}
|
||||
restore-keys: ${{ runner.os }}-cargo-
|
||||
|
||||
- name: Regenerate Rust types (via cargo build)
|
||||
|
||||
@@ -19,18 +19,6 @@ jobs:
|
||||
uses: actions/setup-python@v5
|
||||
with:
|
||||
python-version: ${{ env.PYTHON_VERSION }}
|
||||
cache: pip
|
||||
cache-dependency-path: |
|
||||
pyproject.toml
|
||||
uv.lock
|
||||
|
||||
- name: Restore Python venv cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: .venv
|
||||
key: ${{ runner.os }}-py${{ env.PYTHON_VERSION }}-venv-${{ hashFiles('pyproject.toml', 'uv.lock') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-py${{ env.PYTHON_VERSION }}-venv-
|
||||
|
||||
- name: Restore uv cache
|
||||
uses: actions/cache@v4
|
||||
@@ -42,12 +30,8 @@ jobs:
|
||||
|
||||
- name: Install dependencies
|
||||
run: |
|
||||
if [ ! -d ".venv" ]; then
|
||||
python -m pip install --upgrade pip uv
|
||||
uv venv .venv
|
||||
else
|
||||
python -m pip install --upgrade pip uv
|
||||
fi
|
||||
python -m pip install --upgrade uv
|
||||
uv venv .venv
|
||||
source .venv/bin/activate
|
||||
uv pip install -e ".[dev,all]"
|
||||
|
||||
@@ -97,6 +81,9 @@ jobs:
|
||||
- name: Run Biome linting
|
||||
run: npx biome lint . --reporter=github
|
||||
|
||||
- name: Check Biome formatting
|
||||
run: npm run format:check
|
||||
|
||||
- name: Run TypeScript quality tests
|
||||
run: npm run test:quality
|
||||
|
||||
@@ -144,29 +131,4 @@ jobs:
|
||||
- name: Run Clippy
|
||||
run: cargo clippy -- -D warnings
|
||||
|
||||
format-check:
|
||||
runs-on: ubuntu-22.04
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
|
||||
- name: Set up Node.js
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ env.NODE_VERSION }}
|
||||
cache: npm
|
||||
cache-dependency-path: client/package-lock.json
|
||||
|
||||
- name: Install client dependencies
|
||||
run: cd client && npm ci
|
||||
|
||||
- name: Check Biome formatting
|
||||
run: cd client && npm run format:check
|
||||
|
||||
- name: Set up Rust
|
||||
uses: dtolnay/rust-toolchain@stable
|
||||
with:
|
||||
toolchain: ${{ env.RUST_TOOLCHAIN }}
|
||||
components: rustfmt
|
||||
|
||||
- name: Check Rust formatting
|
||||
run: cd client/src-tauri && cargo fmt --check
|
||||
|
||||
Reference in New Issue
Block a user