Skip to content

fix(android): preserve sync cursors and retention #66

fix(android): preserve sync cursors and retention

fix(android): preserve sync cursors and retention #66

Workflow file for this run

name: CI
on:
push:
branches:
- main
paths-ignore:
- "**/*.md"
pull_request:
paths-ignore:
- "**/*.md"
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
static:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
cache: true
- name: Check generated drift
run: scripts/dev/drift-check.sh
- name: Check SQLite schema
run: scripts/dev/schema-check.sh
- name: Run repo-specific static checks
run: go run ./scripts/dev/staticcheck
- name: Run actionlint
run: |
. scripts/dev/go-tool-versions.sh
go run "github.com/rhysd/actionlint/cmd/actionlint@${ACTIONLINT_VERSION}"
- name: Run errcheck
run: |
. scripts/dev/go-tool-versions.sh
go run "github.com/kisielk/errcheck@${ERRCHECK_VERSION}" ./...
- name: Run staticcheck
run: |
. scripts/dev/go-tool-versions.sh
go run "honnef.co/go/tools/cmd/staticcheck@${STATICCHECK_VERSION}" ./...
- name: Run govulncheck
run: |
. scripts/dev/go-tool-versions.sh
go run "golang.org/x/vuln/cmd/govulncheck@${GOVULNCHECK_VERSION}" ./...
go:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- name: Install media tools
run: sudo apt-get update && sudo apt-get install -y ffmpeg
- uses: actions/setup-go@4a3601121dd01d1626a1e23e37211e3254c1c06c # v6
with:
go-version-file: go.mod
cache: true
- name: Run Go tests
run: go test ./...
- name: Run web process-level test
run: scripts/dev/web-test.sh
runtime:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
- uses: DeterminateSystems/determinate-nix-action@bafaa638b9d5ec0e7e3ac1a7fc80453ef1fd265f # v3
- uses: DeterminateSystems/magic-nix-cache-action@908b263ff629f4cc17666315b7fd3ec127c6244d # main
with:
use-flakehub: false
- name: Build downloader runtime tools
run: nix build .#yt-dlp .#gallery-dl --no-link --print-build-logs
android:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6
with:
fetch-depth: 0
- id: filter
name: Detect Android-relevant changes
shell: bash
run: |
if [[ "${{ github.event_name }}" == "pull_request" ]]; then
base="${{ github.event.pull_request.base.sha }}"
head="${{ github.sha }}"
else
base="${{ github.event.before }}"
head="${{ github.sha }}"
if [[ -z "$base" || "$base" =~ ^0+$ ]]; then
base="$(git rev-list --max-parents=0 "$head")"
fi
fi
git diff --name-only "$base" "$head" | tee "$RUNNER_TEMP/android-changed-files.txt"
if grep -Eq '^(android/|\.github/workflows/ci\.yml$)' "$RUNNER_TEMP/android-changed-files.txt"; then
echo "android=true" >> "$GITHUB_OUTPUT"
else
echo "android=false" >> "$GITHUB_OUTPUT"
fi
- name: Report skipped Android CI
if: steps.filter.outputs.android != 'true'
run: echo "No Android-relevant changes; Android CI is not required for this ref."
- uses: actions/setup-java@be666c2fcd27ec809703dec50e508c2fdc7f6654 # v5
if: steps.filter.outputs.android == 'true'
with:
distribution: temurin
java-version: "26"
- name: Run Android unit tests
if: steps.filter.outputs.android == 'true'
working-directory: android
run: ./test.sh