mirror of
https://github.com/tinyhumansai/openhuman.git
synced 2026-07-28 13:32:23 +00:00
* chore: uppercase PR template (summary, problem, solution) Made-with: Cursor * chore: uppercase PR template (testing, impact) Made-with: Cursor * chore: uppercase PR template (breaking changes, related) Made-with: Cursor * chore: intermediate rename for pull request template path Made-with: Cursor * chore: use uppercase PULL_REQUEST_TEMPLATE.md Made-with: Cursor * docs: point agent docs at PULL_REQUEST_TEMPLATE.md Made-with: Cursor * chore: update pull request and feature issue templates for clarity and consistency - Standardized section headings to title case for uniformity. - Enhanced descriptions for each section to improve guidance for contributors. - Introduced a new feature issue template to streamline feature proposals and documentation requirements. * docs: enhance issue and pull request templates for better guidance - Added a new bug issue template to standardize bug reporting. - Updated the feature issue template to clarify the problem and solution sections. - Revised the pull request template to include a submission checklist for testing and documentation requirements. * chore: comment out E2E macOS workflow steps in test.yml - Temporarily disabled the E2E (macOS / Appium) job in the GitHub Actions workflow by commenting out all related steps for future reference.
145 lines
3.8 KiB
YAML
145 lines
3.8 KiB
YAML
name: Test
|
|
|
|
on:
|
|
push:
|
|
pull_request:
|
|
|
|
permissions:
|
|
contents: read
|
|
pull-requests: read
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.head_ref || github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
unit-tests:
|
|
name: Frontend Unit Tests
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Setup Node.js 24.x
|
|
uses: actions/setup-node@v4
|
|
with:
|
|
node-version: 24.x
|
|
cache: "yarn"
|
|
|
|
- name: Cache node modules
|
|
id: yarn-cache
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: node_modules
|
|
key: ${{ runner.os }}-test-${{ hashFiles('**/yarn.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-test-
|
|
${{ runner.os }}-build-
|
|
|
|
- name: Install dependencies
|
|
if: steps.yarn-cache.outputs.cache-hit != 'true'
|
|
run: yarn install --frozen-lockfile
|
|
|
|
- name: Run tests with coverage
|
|
run: yarn test:coverage
|
|
env:
|
|
NODE_ENV: test
|
|
|
|
- name: Upload coverage reports
|
|
if: always()
|
|
uses: actions/upload-artifact@v4
|
|
with:
|
|
name: coverage-report
|
|
path: coverage
|
|
retention-days: 7
|
|
|
|
rust-tests:
|
|
name: Rust Tests + Quality
|
|
runs-on: ubuntu-22.04
|
|
steps:
|
|
- name: Checkout code
|
|
uses: actions/checkout@v4
|
|
with:
|
|
fetch-depth: 1
|
|
|
|
- name: Install Rust (rust-toolchain.toml)
|
|
uses: dtolnay/rust-toolchain@1.93.0
|
|
with:
|
|
components: rustfmt, clippy
|
|
targets: x86_64-unknown-linux-gnu
|
|
|
|
- name: Install Tauri build dependencies
|
|
run: |
|
|
sudo apt-get update
|
|
sudo apt-get install -y libgtk-3-dev libwebkit2gtk-4.1-dev libappindicator3-dev librsvg2-dev patchelf
|
|
|
|
# Match build.yml: lockfile body only (skip workspace version header noise)
|
|
- name: Cargo.lock fingerprint (deps only)
|
|
id: cargo-lock-fingerprint
|
|
shell: bash
|
|
run: |
|
|
echo "hash=$(tail -n +8 Cargo.lock | openssl dgst -sha256 | awk '{print $2}')" >> "$GITHUB_OUTPUT"
|
|
|
|
- name: Cache Cargo registry and git sources
|
|
uses: actions/cache@v4
|
|
with:
|
|
path: |
|
|
~/.cargo/registry
|
|
~/.cargo/git
|
|
key: ${{ runner.os }}-rust-test-cargo-${{ steps.cargo-lock-fingerprint.outputs.hash }}
|
|
restore-keys: |
|
|
${{ runner.os }}-rust-test-cargo-
|
|
|
|
- name: Check formatting (cargo fmt)
|
|
run: cargo fmt --all -- --check
|
|
|
|
- name: Run clippy (core crate)
|
|
run: cargo clippy -p openhuman
|
|
|
|
- name: Test core crate (openhuman)
|
|
run: cargo test -p openhuman
|
|
|
|
- name: Test Tauri shell (OpenHuman)
|
|
run: cargo test --manifest-path app/src-tauri/Cargo.toml
|
|
|
|
# e2e-macos:
|
|
# name: E2E (macOS / Appium)
|
|
# runs-on: macos-latest
|
|
# timeout-minutes: 90
|
|
# steps:
|
|
# - name: Checkout code
|
|
# uses: actions/checkout@v4
|
|
# with:
|
|
# fetch-depth: 1
|
|
# submodules: recursive
|
|
|
|
# - name: Setup Node.js 24.x
|
|
# uses: actions/setup-node@v4
|
|
# with:
|
|
# node-version: 24.x
|
|
# cache: "yarn"
|
|
|
|
# - name: Install Rust (rust-toolchain.toml)
|
|
# uses: dtolnay/rust-toolchain@1.93.0
|
|
|
|
# - name: Install dependencies
|
|
# run: yarn install --frozen-lockfile
|
|
|
|
# - name: Ensure .env exists for E2E build
|
|
# run: |
|
|
# touch .env
|
|
# touch app/.env
|
|
|
|
# - name: Install Appium and mac2 driver
|
|
# run: |
|
|
# npm install -g appium
|
|
# appium driver install mac2
|
|
|
|
# - name: Build E2E app bundle
|
|
# run: yarn workspace openhuman-app test:e2e:build
|
|
|
|
# - name: Run all E2E flows
|
|
# run: yarn workspace openhuman-app test:e2e:all:flows
|