mirror of
https://github.com/SideStore/SideStore.git
synced 2026-02-18 11:13:28 +01:00
- UITests: Fix: exclude pojavlauncher from testing since it is unreliable and fetch fails
This commit is contained in:
346
.github/workflows/reusable-build-workflow.yml
vendored
346
.github/workflows/reusable-build-workflow.yml
vendored
@@ -332,214 +332,214 @@ jobs:
|
|||||||
path: beta-build-num.zip
|
path: beta-build-num.zip
|
||||||
|
|
||||||
|
|
||||||
# test:
|
test:
|
||||||
# name: Test SideStore - ${{ inputs.release_tag }}
|
name: Test SideStore - ${{ inputs.release_tag }}
|
||||||
# needs: serialize
|
needs: serialize
|
||||||
# strategy:
|
strategy:
|
||||||
# fail-fast: false
|
fail-fast: false
|
||||||
# matrix:
|
matrix:
|
||||||
# include:
|
include:
|
||||||
# - os: 'macos-15'
|
- os: 'macos-15'
|
||||||
# version: '16.1'
|
version: '16.1'
|
||||||
# runs-on: ${{ matrix.os }}
|
runs-on: ${{ matrix.os }}
|
||||||
|
|
||||||
# steps:
|
steps:
|
||||||
# - name: Checkout code
|
- name: Checkout code
|
||||||
# uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
# with:
|
with:
|
||||||
# submodules: recursive
|
submodules: recursive
|
||||||
|
|
||||||
# - name: Boot Simulator for testing
|
- name: Boot Simulator for testing
|
||||||
# run: |
|
run: |
|
||||||
# mkdir -p build/logs
|
mkdir -p build/logs
|
||||||
# make -B boot-sim-async | tee -a build/logs/test.log
|
make -B boot-sim-async | tee -a build/logs/test.log
|
||||||
# exit ${PIPESTATUS[0]}
|
exit ${PIPESTATUS[0]}
|
||||||
|
|
||||||
# - name: Install dependencies - ldid & xcbeautify & xcpretty
|
- name: Install dependencies - ldid & xcbeautify & xcpretty
|
||||||
# run: |
|
run: |
|
||||||
# brew install ldid xcbeautify
|
brew install ldid xcbeautify
|
||||||
# gem install xcpretty
|
gem install xcpretty
|
||||||
|
|
||||||
# - name: Setup Xcode
|
- name: Setup Xcode
|
||||||
# uses: maxim-lobanov/setup-xcode@v1.6.0
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
||||||
# with:
|
with:
|
||||||
# xcode-version: '16.1'
|
xcode-version: '16.1'
|
||||||
|
|
||||||
# - name: (Test) Cache Build
|
- name: (Test) Cache Build
|
||||||
# uses: irgaly/xcode-cache@v1
|
uses: irgaly/xcode-cache@v1
|
||||||
# with:
|
with:
|
||||||
# key: xcode-cache-deriveddata-test-${{ github.sha }}
|
key: xcode-cache-deriveddata-test-${{ github.sha }}
|
||||||
# restore-keys: xcode-cache-deriveddata-test-
|
restore-keys: xcode-cache-deriveddata-test-
|
||||||
# swiftpm-cache-key: xcode-cache-sourcedata-test-${{ github.sha }}
|
swiftpm-cache-key: xcode-cache-sourcedata-test-${{ github.sha }}
|
||||||
# swiftpm-cache-restore-keys: |
|
swiftpm-cache-restore-keys: |
|
||||||
# xcode-cache-sourcedata-test-
|
xcode-cache-sourcedata-test-
|
||||||
|
|
||||||
# - name: (Test) Restore Pods from Cache (Exact match)
|
- name: (Test) Restore Pods from Cache (Exact match)
|
||||||
# id: pods-restore
|
id: pods-restore
|
||||||
# uses: actions/cache/restore@v3
|
uses: actions/cache/restore@v3
|
||||||
# with:
|
with:
|
||||||
# path: |
|
path: |
|
||||||
# ./Podfile.lock
|
./Podfile.lock
|
||||||
# ./Pods/
|
./Pods/
|
||||||
# ./AltStore.xcworkspace/
|
./AltStore.xcworkspace/
|
||||||
# key: pods-cache-test-${{ hashFiles('Podfile') }}
|
key: pods-cache-test-${{ hashFiles('Podfile') }}
|
||||||
|
|
||||||
# - name: (Test) Restore Pods from Cache (Last Available)
|
- name: (Test) Restore Pods from Cache (Last Available)
|
||||||
# if: ${{ steps.pods-restore.outputs.cache-hit != 'true' }}
|
if: ${{ steps.pods-restore.outputs.cache-hit != 'true' }}
|
||||||
# id: pods-restore-recent
|
id: pods-restore-recent
|
||||||
# uses: actions/cache/restore@v3
|
uses: actions/cache/restore@v3
|
||||||
# with:
|
with:
|
||||||
# path: |
|
path: |
|
||||||
# ./Podfile.lock
|
./Podfile.lock
|
||||||
# ./Pods/
|
./Pods/
|
||||||
# ./AltStore.xcworkspace/
|
./AltStore.xcworkspace/
|
||||||
# key: pods-cache-test-
|
key: pods-cache-test-
|
||||||
|
|
||||||
# - name: (Test) Install CocoaPods
|
- name: (Test) Install CocoaPods
|
||||||
# run: pod install
|
run: pod install
|
||||||
|
|
||||||
# - name: (Test) Save Pods to Cache
|
- name: (Test) Save Pods to Cache
|
||||||
# if: ${{ steps.pods-restore.outputs.cache-hit != 'true' }}
|
if: ${{ steps.pods-restore.outputs.cache-hit != 'true' }}
|
||||||
# uses: actions/cache/save@v3
|
uses: actions/cache/save@v3
|
||||||
# with:
|
with:
|
||||||
# path: |
|
path: |
|
||||||
# ./Podfile.lock
|
./Podfile.lock
|
||||||
# ./Pods/
|
./Pods/
|
||||||
# ./AltStore.xcworkspace/
|
./AltStore.xcworkspace/
|
||||||
# key: pods-cache-test-${{ hashFiles('Podfile') }}
|
key: pods-cache-test-${{ hashFiles('Podfile') }}
|
||||||
|
|
||||||
# - name: (Test) Clean previous build artifacts
|
- name: (Test) Clean previous build artifacts
|
||||||
# run: |
|
run: |
|
||||||
# make clean
|
make clean
|
||||||
# mkdir -p build/logs
|
mkdir -p build/logs
|
||||||
|
|
||||||
# - name: (Test) List Files and derived data
|
- name: (Test) List Files and derived data
|
||||||
# run: |
|
run: |
|
||||||
# echo ">>>>>>>>> Workdir <<<<<<<<<<"
|
echo ">>>>>>>>> Workdir <<<<<<<<<<"
|
||||||
# ls -la .
|
ls -la .
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# echo ">>>>>>>>> Pods <<<<<<<<<<"
|
echo ">>>>>>>>> Pods <<<<<<<<<<"
|
||||||
# find Pods -maxdepth 2 -exec ls -ld {} + || true # List contents if directory exists
|
find Pods -maxdepth 2 -exec ls -ld {} + || true # List contents if directory exists
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# echo ">>>>>>>>> SideStore <<<<<<<<<<"
|
echo ">>>>>>>>> SideStore <<<<<<<<<<"
|
||||||
# find SideStore -maxdepth 2 -exec ls -ld {} + || true # List contents if directory exists
|
find SideStore -maxdepth 2 -exec ls -ld {} + || true # List contents if directory exists
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# echo ">>>>>>>>> Dependencies <<<<<<<<<<"
|
echo ">>>>>>>>> Dependencies <<<<<<<<<<"
|
||||||
# find Dependencies -maxdepth 2 -exec ls -ld {} + || true # List contents if directory exists
|
find Dependencies -maxdepth 2 -exec ls -ld {} + || true # List contents if directory exists
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# echo ">>>>>>>>> Xcode-Derived-Data <<<<<<<<<<"
|
echo ">>>>>>>>> Xcode-Derived-Data <<<<<<<<<<"
|
||||||
# ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists
|
ls -la ~/Library/Developer/Xcode/DerivedData || true # List contents if directory exists
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# # we expect simulator to have been booted by now, so exit otherwise
|
# we expect simulator to have been booted by now, so exit otherwise
|
||||||
# - name: Simulator Boot Check
|
- name: Simulator Boot Check
|
||||||
# run: |
|
run: |
|
||||||
# mkdir -p build/logs
|
mkdir -p build/logs
|
||||||
# make -B sim-boot-check | tee -a build/logs/test.log
|
make -B sim-boot-check | tee -a build/logs/test.log
|
||||||
# exit ${PIPESTATUS[0]}
|
exit ${PIPESTATUS[0]}
|
||||||
|
|
||||||
# - name: Start Recording UI tests (if DEBUG_RECORD_TESTS is set to 1)
|
- name: Start Recording UI tests (if DEBUG_RECORD_TESTS is set to 1)
|
||||||
# if: ${{ vars.DEBUG_RECORD_TESTS == '1' }}
|
if: ${{ vars.DEBUG_RECORD_TESTS == '1' }}
|
||||||
# run: |
|
run: |
|
||||||
# nohup xcrun simctl io booted recordVideo -f test-recording.mp4 --codec h264 </dev/null > test-recording.log 2>&1 &
|
nohup xcrun simctl io booted recordVideo -f test-recording.mp4 --codec h264 </dev/null > test-recording.log 2>&1 &
|
||||||
# RECORD_PID=$!
|
RECORD_PID=$!
|
||||||
# echo "RECORD_PID=$RECORD_PID" >> $GITHUB_ENV
|
echo "RECORD_PID=$RECORD_PID" >> $GITHUB_ENV
|
||||||
|
|
||||||
# # build will be up-to-date from previous step so here only test will be executed directly
|
# build will be up-to-date from previous step so here only test will be executed directly
|
||||||
# - name: Run SideStore Tests
|
- name: Run SideStore Tests
|
||||||
# # using 'tee' to intercept stdout and log for detailed build-log
|
# using 'tee' to intercept stdout and log for detailed build-log
|
||||||
# run: |
|
run: |
|
||||||
# NSUnbufferedIO=YES make -B build-and-test 2>&1 | tee -a build/logs/test.log | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
|
NSUnbufferedIO=YES make -B build-and-test 2>&1 | tee -a build/logs/test.log | xcbeautify --renderer github-actions && exit ${PIPESTATUS[0]}
|
||||||
# # NSUnbufferedIO=YES make -B build-and-test 2>&1 | tee build/logs/test.log | xcpretty -r junit --output ./build/tests/test-results.xml && exit ${PIPESTATUS[0]}
|
# NSUnbufferedIO=YES make -B build-and-test 2>&1 | tee build/logs/test.log | xcpretty -r junit --output ./build/tests/test-results.xml && exit ${PIPESTATUS[0]}
|
||||||
|
|
||||||
# - name: Stop Recording tests
|
- name: Stop Recording tests
|
||||||
# if: ${{ always() && env.RECORD_PID != '' }}
|
if: ${{ always() && env.RECORD_PID != '' }}
|
||||||
# run: |
|
run: |
|
||||||
# kill -INT ${{ env.RECORD_PID }}
|
kill -INT ${{ env.RECORD_PID }}
|
||||||
|
|
||||||
# - name: (Test) List Files and Build artifacts
|
- name: (Test) List Files and Build artifacts
|
||||||
# if: always()
|
if: always()
|
||||||
# run: |
|
run: |
|
||||||
# echo ">>>>>>>>> Workdir <<<<<<<<<<"
|
echo ">>>>>>>>> Workdir <<<<<<<<<<"
|
||||||
# ls -la .
|
ls -la .
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# echo ">>>>>>>>> Build <<<<<<<<<<"
|
echo ">>>>>>>>> Build <<<<<<<<<<"
|
||||||
# find build -maxdepth 3 -exec ls -ld {} + || true # List contents if directory exists
|
find build -maxdepth 3 -exec ls -ld {} + || true # List contents if directory exists
|
||||||
# echo ""
|
echo ""
|
||||||
|
|
||||||
# - name: Encrypt test-logs for upload
|
- name: Encrypt test-logs for upload
|
||||||
# id: encrypt-test-log
|
id: encrypt-test-log
|
||||||
# if: always()
|
if: always()
|
||||||
# run: |
|
run: |
|
||||||
# DEFAULT_BUILD_LOG_PASSWORD=12345
|
DEFAULT_BUILD_LOG_PASSWORD=12345
|
||||||
|
|
||||||
# BUILD_LOG_ZIP_PASSWORD=${{ secrets.BUILD_LOG_ZIP_PASSWORD }}
|
BUILD_LOG_ZIP_PASSWORD=${{ secrets.BUILD_LOG_ZIP_PASSWORD }}
|
||||||
# BUILD_LOG_ZIP_PASSWORD=${BUILD_LOG_ZIP_PASSWORD:-$DEFAULT_BUILD_LOG_PASSWORD}
|
BUILD_LOG_ZIP_PASSWORD=${BUILD_LOG_ZIP_PASSWORD:-$DEFAULT_BUILD_LOG_PASSWORD}
|
||||||
|
|
||||||
# if [ "$BUILD_LOG_ZIP_PASSWORD" == "$DEFAULT_BUILD_LOG_PASSWORD" ]; then
|
if [ "$BUILD_LOG_ZIP_PASSWORD" == "$DEFAULT_BUILD_LOG_PASSWORD" ]; then
|
||||||
# echo "Warning: BUILD_LOG_ZIP_PASSWORD is not set. Defaulting to '${DEFAULT_BUILD_LOG_PASSWORD}'."
|
echo "Warning: BUILD_LOG_ZIP_PASSWORD is not set. Defaulting to '${DEFAULT_BUILD_LOG_PASSWORD}'."
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
# pushd build/logs && zip -e -P "$BUILD_LOG_ZIP_PASSWORD" ../../encrypted-test-logs.zip * || popd
|
pushd build/logs && zip -e -P "$BUILD_LOG_ZIP_PASSWORD" ../../encrypted-test-logs.zip * || popd
|
||||||
# echo "::set-output name=encrypted::true"
|
echo "::set-output name=encrypted::true"
|
||||||
|
|
||||||
# - name: Upload encrypted-test-logs.zip
|
- name: Upload encrypted-test-logs.zip
|
||||||
# id: attach-encrypted-test-log
|
id: attach-encrypted-test-log
|
||||||
# if: always() && steps.encrypt-test-log.outputs.encrypted == 'true'
|
if: always() && steps.encrypt-test-log.outputs.encrypted == 'true'
|
||||||
# uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: encrypted-test-logs-${{ github.sha }}.zip
|
name: encrypted-test-logs-${{ github.sha }}.zip
|
||||||
# path: encrypted-test-logs.zip
|
path: encrypted-test-logs.zip
|
||||||
|
|
||||||
# - name: Print test-recording.log contents (if exists)
|
- name: Print test-recording.log contents (if exists)
|
||||||
# if: ${{ always() && env.RECORD_PID != '' }}
|
if: ${{ always() && env.RECORD_PID != '' }}
|
||||||
# run: |
|
run: |
|
||||||
# if [ -f test-recording.log ]; then
|
if [ -f test-recording.log ]; then
|
||||||
# echo "test-recording.log found. Its contents:"
|
echo "test-recording.log found. Its contents:"
|
||||||
# cat test-recording.log
|
cat test-recording.log
|
||||||
# else
|
else
|
||||||
# echo "test-recording.log not found."
|
echo "test-recording.log not found."
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
# - name: Check for test-recording.mp4 presence
|
- name: Check for test-recording.mp4 presence
|
||||||
# id: check-recording
|
id: check-recording
|
||||||
# if: ${{ always() && env.RECORD_PID != '' }}
|
if: ${{ always() && env.RECORD_PID != '' }}
|
||||||
# run: |
|
run: |
|
||||||
# if [ -f test-recording.mp4 ]; then
|
if [ -f test-recording.mp4 ]; then
|
||||||
# echo "::set-output name=found::true"
|
echo "::set-output name=found::true"
|
||||||
# echo "test-recording.mp4 found."
|
echo "test-recording.mp4 found."
|
||||||
# else
|
else
|
||||||
# echo "test-recording.mp4 not found, skipping upload."
|
echo "test-recording.mp4 not found, skipping upload."
|
||||||
# echo "::set-output name=found::false"
|
echo "::set-output name=found::false"
|
||||||
# fi
|
fi
|
||||||
|
|
||||||
# - name: Upload test-recording.mp4
|
- name: Upload test-recording.mp4
|
||||||
# id: upload-recording
|
id: upload-recording
|
||||||
# if: ${{ always() && steps.check-recording.outputs.found == 'true' }}
|
if: ${{ always() && steps.check-recording.outputs.found == 'true' }}
|
||||||
# uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: test-recording-${GITHUB_SHA:0:7}.mp4
|
name: test-recording-${{ needs.serialize.outputs.short-commit }}.mp4
|
||||||
# path: test-recording.mp4
|
path: test-recording.mp4
|
||||||
|
|
||||||
# - name: Zip test-results
|
- name: Zip test-results
|
||||||
# run: zip -r -9 ./test-results.zip ./build/tests
|
run: zip -r -9 ./test-results.zip ./build/tests
|
||||||
|
|
||||||
# - name: Upload Test Artifacts
|
- name: Upload Test Artifacts
|
||||||
# uses: actions/upload-artifact@v4
|
uses: actions/upload-artifact@v4
|
||||||
# with:
|
with:
|
||||||
# name: test-results-${GITHUB_SHA:0:7}.zip
|
name: test-results-${{ needs.serialize.outputs.short-commit }}.zip
|
||||||
# path: test-results.zip
|
path: test-results.zip
|
||||||
|
|
||||||
deploy:
|
deploy:
|
||||||
name: Deploy SideStore - ${{ inputs.release_tag }}
|
name: Deploy SideStore - ${{ inputs.release_tag }}
|
||||||
runs-on: macos-15
|
runs-on: macos-15
|
||||||
needs: [serialize, build]
|
# needs: [serialize, build]
|
||||||
# needs: [serialize, build, test]
|
needs: [serialize, build, test]
|
||||||
steps:
|
steps:
|
||||||
- name: Download IPA artifact
|
- name: Download IPA artifact
|
||||||
uses: actions/download-artifact@v4
|
uses: actions/download-artifact@v4
|
||||||
|
|||||||
@@ -379,7 +379,7 @@ private extension UITests {
|
|||||||
let sourceButton = cellsQuery.otherElements
|
let sourceButton = cellsQuery.otherElements
|
||||||
.containing(.button, identifier: source.identifier)
|
.containing(.button, identifier: source.identifier)
|
||||||
.children(matching: .button)[source.identifier]
|
.children(matching: .button)[source.identifier]
|
||||||
XCTAssert(sourceButton.exists || sourceButton.waitForExistence(timeout: 5), "Source preview for id: '\(source.alertTitle)' not found in the view")
|
XCTAssert(sourceButton.exists || sourceButton.waitForExistence(timeout: 10), "Source preview for id: '\(source.alertTitle)' not found in the view")
|
||||||
|
|
||||||
// let addButton = sourceButton.children(matching: .button).firstMatch
|
// let addButton = sourceButton.children(matching: .button).firstMatch
|
||||||
let addButton = sourceButton.children(matching: .button)["add"]
|
let addButton = sourceButton.children(matching: .button)["add"]
|
||||||
@@ -407,7 +407,7 @@ private extension UITests {
|
|||||||
("OatmealDome's AltStore Source\naltstore.oatmealdome.me", "OatmealDome's AltStore Source", true),
|
("OatmealDome's AltStore Source\naltstore.oatmealdome.me", "OatmealDome's AltStore Source", true),
|
||||||
("UTM Repository\nVirtual machines for iOS", "UTM Repository", false),
|
("UTM Repository\nVirtual machines for iOS", "UTM Repository", false),
|
||||||
("Flyinghead\nflyinghead.github.io/flycast-builds/altstore.json", "Flyinghead", false),
|
("Flyinghead\nflyinghead.github.io/flycast-builds/altstore.json", "Flyinghead", false),
|
||||||
("PojavLauncher Repository\nalt.crystall1ne.dev", "PojavLauncher Repository", false),
|
// ("PojavLauncher Repository\nalt.crystall1ne.dev", "PojavLauncher Repository", false), // not a stable source, sometimes becomes unreachable, so disabled
|
||||||
("PokeMMO\npokemmo.eu/altstore/", "PokeMMO", true),
|
("PokeMMO\npokemmo.eu/altstore/", "PokeMMO", true),
|
||||||
("Odyssey\ntheodyssey.dev/altstore/odysseysource.json", "Odyssey", false),
|
("Odyssey\ntheodyssey.dev/altstore/odysseysource.json", "Odyssey", false),
|
||||||
("Yattee\nrepos.yattee.stream/alt/apps.json", "Yattee", false),
|
("Yattee\nrepos.yattee.stream/alt/apps.json", "Yattee", false),
|
||||||
|
|||||||
Reference in New Issue
Block a user