Skip to content

Commit

Permalink
Remove unneeded parts from test
Browse files Browse the repository at this point in the history
  • Loading branch information
ViliusSutkus89 committed Jun 19, 2024
1 parent 2a1c832 commit c90fabf
Showing 1 changed file with 1 addition and 158 deletions.
159 changes: 1 addition & 158 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,71 +42,15 @@ permissions:
statuses: none

jobs:
build:
if: false
runs-on: ubuntu-24.04
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: android-actions/setup-android@v3

- name: setup python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: install python dependencies
run: pip install --upgrade pip conan setuptools

- run: conan config install .github/conan
- run: |
conan profile list
conan profile show
- uses: actions/checkout@v4
with:
repository: ViliusSutkus89/conan-odr-index
ref: pdf2htmlEX_and_deps
path: conan-odr-index

- uses: actions/cache@v4
with:
path: ~/.conan2
key: conan-cache

- run: python scripts/conan_export_all_packages.py
working-directory: conan-odr-index

- run: ./gradlew lintRelease publishToMavenLocal

- uses: actions/upload-artifact@v4
with:
name: library-lint-report
path: pdf2htmlEX/build/reports/lint-results-release.html
if-no-files-found: error

- uses: actions/upload-artifact@v4
with:
name: maven-local
path: ~/.m2
if-no-files-found: error

instrumentedTests-aosp_atd-target:
runs-on: ubuntu-24.04
name: android-${{ matrix.api-level }} on ${{ matrix.arch }} (${{ matrix.api-type-target }})
# needs: build
strategy:
fail-fast: false
matrix:
api-level: [34]
# api-level: [34, 33, 32, 31, 30]
arch: [x86_64]
api-type-target: [aosp_atd]
include:
- api-level: 30
arch: x86
api-type-target: aosp_atd
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
Expand Down Expand Up @@ -156,108 +100,7 @@ jobs:
target: ${{ matrix.api-type-target }}
sdcard-path-or-size: 1G
disk-size: 8G
script: |
mkdir -p testResults/screenshots
adb logcat > testResults/logcat.txt &
adb shell screencap /data/local/tmp/beforeTests.png
adb pull /data/local/tmp/beforeTests.png testResults/screenshots/
# ./gradlew connectedCheck || touch sorry_but_tests_are_failing
true || touch sorry_but_tests_are_failing
adb pull /sdcard/Pictures/screenshots testResults/ || true

adb shell screencap /data/local/tmp/afterTests.png
adb pull /data/local/tmp/afterTests.png testResults/screenshots/

# mv pdf2htmlEX/build/reports/androidTests/connected testResults/
# mv pdf2htmlEX/build/outputs/androidTest-results testResults/

test ! -f sorry_but_tests_are_failing

- uses: actions/upload-artifact@v4
if: always()
with:
name: testResults-${{ matrix.api-level }}-${{ matrix.arch }}-${{ matrix.api-type-target }}
path: testResults
if-no-files-found: error

instrumentedTests-default-target:
runs-on: ubuntu-24.04
if: false
name: android-${{ matrix.api-level }} on ${{ matrix.arch }} (${{ matrix.api-type-target }})
needs: build
strategy:
fail-fast: false
matrix:
api-level: [29, 28, 27, 26, 25, 24, 23, 22, 21]
arch: [x86_64, x86]
api-type-target: [default]
steps:
- uses: actions/checkout@v4
- uses: actions/setup-java@v4
with:
distribution: temurin
java-version: 17
- uses: android-actions/setup-android@v3

- name: setup python 3.12
uses: actions/setup-python@v5
with:
python-version: 3.12
- name: install python dependencies
run: pip install --upgrade pip conan

- run: conan config install .github/conan
- run: |
conan profile list
conan profile show
- uses: actions/checkout@v4
with:
repository: ViliusSutkus89/conan-odr-index
ref: pdf2htmlEX_and_deps
path: conan-odr-index

- uses: actions/cache/restore@v4
with:
path: ~/.conan2
key: conan-cache

- run: python scripts/conan_export_all_packages.py
working-directory: conan-odr-index

- name: Enable KVM group perms
run: |
echo 'KERNEL=="kvm", GROUP="kvm", MODE="0666", OPTIONS+="static_node=kvm"' | sudo tee /etc/udev/rules.d/99-kvm4all.rules
sudo udevadm control --reload-rules
sudo udevadm trigger --name-match=kvm
- uses: reactivecircus/android-emulator-runner@v2
with:
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none -no-snapshot-save
api-level: ${{ matrix.api-level }}
arch: ${{ matrix.arch }}
target: ${{ matrix.api-type-target }}
sdcard-path-or-size: 1G
disk-size: 8G
script: |
mkdir -p testResults/screenshots
adb logcat > testResults/logcat.txt &
adb shell screencap /data/local/tmp/beforeTests.png
adb pull /data/local/tmp/beforeTests.png testResults/screenshots/
./gradlew connectedCheck || touch sorry_but_tests_are_failing
adb pull /sdcard/Pictures/screenshots testResults/ || true
adb shell screencap /data/local/tmp/afterTests.png
adb pull /data/local/tmp/afterTests.png testResults/screenshots/
mv pdf2htmlEX/build/reports/androidTests/connected testResults/
mv pdf2htmlEX/build/outputs/androidTest-results testResults/
test ! -f sorry_but_tests_are_failing
script: /bin/true

- uses: actions/upload-artifact@v4
if: always()
Expand Down

0 comments on commit c90fabf

Please sign in to comment.