m3_lightmeter/.github/workflows/run_integration_tests.yml
Vadim d6c4240646 ML-157 Improve CI/CD (#162)
* Update README.md

* Set exact Flutter version for workflows

* Added stub `DefaultFirebaseOptions`

* Fixed `rm`

* Removed `rm`

* Update .gitignore

* Added readable name to ci workflow

* Build -> Development

* Update ci.yml

* Extract merged native libraries

* More descriptive run name

* Delete no longer used artifacts

* Replaced "Build ..." flow with "Create release"

* renamed other flows

* try using script for iap stub

* typo

* typo

* typo

* removed working dir

* added comment to stub_iap.sh

* checkout first

* increment build number by script

* Update increment_build_number.sh

* fixed iap repo

* stub

* updated stub script to work with tags

* depend on step conclusion

* check PR number

* run integration tests before build

* reuse Build Android workflow

* added stage backend option

* reuse Build iOS workflow

* temporeraly skip release jobs

* [ios] use distribution profile for release builds

* temporary skip tests

* typo

* checkout actions

* incremented macos runner version

* Restore GoogleService-Info.plist

* Restore firebase_app_id_file.json

* style

* separated android and ios builds

* fixed invalid workflow

* simplified release workflow tree

* fixed android keystore path

* enabled integration tests

* added option to skip integration tests

* fixed android folders...

* enabled releases

* increment build number for ios

* upload ipa to app store

* test ipa upload

* typo

* try to force ipa upload

* removed flavor from ipa artefact name

* try manual ipa upload

* switched to ubuntu for upload

* decode to repo

* Update create_release.yml

* auth with username + password

* reverted temporary settings

* typo

* disable pre-release integration tests by default

* fixed integration tests

* increased integration tests timeout

* delete ipa after upload

* delete all artifacts after the run

* fixed integration tests

* reduce integration tests timeout
2024-03-17 20:04:27 +01:00

55 lines
1.7 KiB
YAML

# This workflow uses actions that are not certified by GitHub.
# They are provided by a third-party and are governed by
# separate terms of service, privacy policy, and support
# documentation.
name: Run integration tests
on:
workflow_dispatch:
workflow_call:
jobs:
run-integration-tests:
name: Run integration tests
timeout-minutes: 60
runs-on: macos-13
steps:
- uses: actions/checkout@v3
with:
submodules: recursive
- name: Override iap package with stub
run: bash ./.github/scripts/stub_iap.sh
- name: Restore secrets
run: |
bash .github/scripts/restore_from_base64.sh "${{ secrets.CONSTANTS }}" "lib/constants.dart"
bash .github/scripts/restore_from_base64.sh "${{ secrets.GOOGLE_SERVICES_JSON_IOS }}" "ios/Runner/GoogleService-Info.plist"
bash .github/scripts/restore_from_base64.sh "${{ secrets.FIREBASE_APP_ID_FILE }}" "ios/firebase_app_id_file.json"
- uses: subosito/flutter-action@v2
with:
channel: "stable"
flutter-version: "3.10.0"
- name: Prepare app
run: |
flutter --version
flutter pub get
flutter pub run intl_utils:generate
flutter analyze lib --fatal-infos
- name: Launch iOS simulator
uses: futureware-tech/simulator-action@v3
with:
model: "iPhone 15 Pro"
- name: Run tests
run: |
flutter drive \
--target=integration_test/run_all_tests.dart \
--driver=test_driver/integration_driver.dart \
--flavor=dev \
--no-dds \
--dart-define cameraStubImage=assets/camera_stub_image.jpg