fix(player): open the source picker for the next episode in manual pl… #2
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: Code Quality | |
| on: | |
| pull_request: | |
| push: | |
| branches: | |
| - main | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: code-quality-${{ github.workflow }}-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| quality: | |
| name: Frontend | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 10 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Setup Vite+ | |
| uses: voidzero-dev/setup-vp@v1 | |
| with: | |
| node-version: 24 | |
| cache: true | |
| run-install: | | |
| args: | |
| - --frozen-lockfile | |
| - name: Check changed files | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then | |
| BASE_SHA="${GITHUB_SHA}^1" | |
| elif [[ -z "${BASE_SHA:-}" || "$BASE_SHA" == "0000000000000000000000000000000000000000" ]]; then | |
| BASE_SHA="$(git rev-list --max-parents=0 "$GITHUB_SHA")" | |
| fi | |
| mapfile -d '' changed_files < <( | |
| git diff --name-only --diff-filter=ACMR -z "$BASE_SHA" "$GITHUB_SHA" | |
| ) | |
| format_files=() | |
| code_files=() | |
| for file in "${changed_files[@]}"; do | |
| case "$file" in | |
| *.cjs | *.css | *.html | *.js | *.json | *.jsonc | *.jsx | *.md | *.mdx | *.mjs | *.scss | *.toml | *.ts | *.tsx | *.yaml | *.yml) | |
| format_files+=("$file") | |
| ;; | |
| esac | |
| case "$file" in | |
| *.cjs | *.js | *.jsx | *.mjs | *.ts | *.tsx) | |
| code_files+=("$file") | |
| ;; | |
| esac | |
| done | |
| if (( ${#format_files[@]} )); then | |
| vp fmt --check "${format_files[@]}" | |
| else | |
| echo "No changed files require formatting checks." | |
| fi | |
| if (( ${#code_files[@]} )); then | |
| check_log="$(mktemp)" | |
| if ! vp check --no-fmt "${code_files[@]}" >"$check_log" 2>&1; then | |
| cat "$check_log" | |
| exit 1 | |
| fi | |
| else | |
| echo "No changed JavaScript or TypeScript files require lint checks." | |
| fi | |
| - name: Typecheck | |
| run: vp run typecheck | |
| - name: Test | |
| run: vp run test | |
| native: | |
| name: Native | |
| runs-on: ubuntu-24.04 | |
| timeout-minutes: 30 | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v6 | |
| with: | |
| fetch-depth: 0 | |
| - name: Detect native changes | |
| id: native-changes | |
| env: | |
| BASE_SHA: ${{ github.event.pull_request.base.sha || github.event.before }} | |
| shell: bash | |
| run: | | |
| set -euo pipefail | |
| if [[ "$GITHUB_EVENT_NAME" == "pull_request" ]]; then | |
| BASE_SHA="${GITHUB_SHA}^1" | |
| elif [[ -z "${BASE_SHA:-}" || "$BASE_SHA" == "0000000000000000000000000000000000000000" ]]; then | |
| BASE_SHA="$(git rev-list --max-parents=0 "$GITHUB_SHA")" | |
| fi | |
| if git diff --quiet "$BASE_SHA" "$GITHUB_SHA" -- \ | |
| src-tauri \ | |
| harbor-core \ | |
| .github/workflows/ci.yml; then | |
| echo "changed=false" >> "$GITHUB_OUTPUT" | |
| else | |
| echo "changed=true" >> "$GITHUB_OUTPUT" | |
| fi | |
| - name: Skip native check | |
| if: steps.native-changes.outputs.changed != 'true' | |
| run: echo "No native build inputs changed; skipping cargo check." | |
| - name: Install Linux build dependencies | |
| if: steps.native-changes.outputs.changed == 'true' | |
| run: | | |
| sudo apt-get update | |
| sudo apt-get install -y \ | |
| libasound2-dev \ | |
| libayatana-appindicator3-dev \ | |
| libgtk-3-dev \ | |
| libmpv-dev \ | |
| librsvg2-dev \ | |
| libssl-dev \ | |
| libwebkit2gtk-4.1-dev \ | |
| pkg-config | |
| - name: Setup Rust | |
| if: steps.native-changes.outputs.changed == 'true' | |
| uses: dtolnay/rust-toolchain@stable | |
| - name: Cache Rust build | |
| if: steps.native-changes.outputs.changed == 'true' | |
| uses: Swatinem/rust-cache@v2 | |
| with: | |
| workspaces: | | |
| harbor-core | |
| src-tauri | |
| - name: Check Tauri application | |
| if: steps.native-changes.outputs.changed == 'true' | |
| env: | |
| # Cargo checks do not package sidecars or the staged Java runtime. | |
| TAURI_CONFIG: '{"bundle":{"externalBin":[],"resources":[]}}' | |
| run: cargo check --manifest-path src-tauri/Cargo.toml | |
| - name: Test Tauri application | |
| if: steps.native-changes.outputs.changed == 'true' | |
| env: | |
| TAURI_CONFIG: '{"bundle":{"externalBin":[],"resources":[]}}' | |
| run: cargo test --manifest-path src-tauri/Cargo.toml |