android-test.yml 1.4 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051
  1. name: Android tests
  2. on:
  3. push:
  4. branches: [ main, master ]
  5. pull_request:
  6. jobs:
  7. test-android:
  8. runs-on: ubuntu-latest
  9. steps:
  10. - uses: actions/checkout@v4
  11. - name: Set up Python 3.11
  12. uses: actions/setup-python@v5
  13. with:
  14. python-version: "3.11"
  15. cache: pip
  16. - name: Install native dependencies
  17. run: sudo apt-get update && sudo apt-get install -y libgpgme-dev libgpg-error-dev
  18. - name: Provide gpgme-config and gpg-error-config
  19. run: |
  20. mkdir -p "$HOME/.local/bin"
  21. cp .github/gpgme-config "$HOME/.local/bin/gpgme-config"
  22. cp .github/gpg-error-config "$HOME/.local/bin/gpg-error-config"
  23. echo "$HOME/.local/bin" >> $GITHUB_PATH
  24. - name: Install dependencies
  25. run: |
  26. python -m pip install --upgrade "setuptools>=77"
  27. python -m pip install --upgrade pip
  28. pip install --upgrade ".[merge,fastimport,paramiko,https]" setuptools-rust
  29. - name: Install gpg
  30. run: pip install --upgrade ".[pgp]"
  31. - name: Build
  32. run: python setup.py build_ext -i
  33. env:
  34. RUSTFLAGS: "-D warnings"
  35. - name: Run tests on Android Emulator
  36. uses: ReactiveCircus/android-emulator-runner@v2
  37. with:
  38. api-level: 30
  39. target: google_apis
  40. arch: x86_64
  41. script: python -m unittest tests.test_suite