Skip to content

chore(deps): update dependency fastlane to v2.214.0 #2644

chore(deps): update dependency fastlane to v2.214.0

chore(deps): update dependency fastlane to v2.214.0 #2644

Workflow file for this run

name: Flutter CI
on:
pull_request:
branches:
- main
paths:
- 'mobile-app/**'
push:
branches:
- main
schedule:
- cron: "0 0 * * *"
jobs:
flutter_test:
name: flutter test
defaults:
run:
working-directory: ./mobile-app
runs-on: macos-latest
steps:
- name: Checkout files
uses: actions/checkout@c85c95e3d7251135ab7dc9ce3241c5835cc595a9 # v3
- name: Setup Java 11
uses: actions/setup-java@5ffc13f4174014e2d4d4572b3d74c3fa61aeb2c2 # v3
with:
distribution: "temurin"
java-version: "11"
cache: "gradle"
- name: AVD cache
uses: actions/cache@88522ab9f39a2ea568f7027eddc7d8d8bc9d59c8 # v3
id: avd-cache
with:
path: |
~/.android/avd/*
~/.android/adb*
key: avd-31
- name: Ceate AVD and generate snapshot for caching
if: steps.avd-cache.outputs.cache-hit != 'true'
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2
with:
api-level: 31
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: false
script: echo "Generated AVD snapshot for caching."
- name: Setup Flutter 3.7.x
uses: subosito/flutter-action@48cafc24713cca54bbe03cdc3a423187d413aafa # v2
with:
flutter-version: "3.7.x"
channel: "stable"
cache: true
cache-key: flutter-3.7.x
cache-path: ${{ runner.tool_cache }}/flutter
- name: Create .env file
run: |
echo "DEVELOPMENTMODE=true" > .env
echo "NEWSURL=https://www.freecodecamp.org/news/ghost/api/v3/content/" >> .env
echo "AUTH0_DOMAIN=$AUTH0_DOMAIN" >> .env
echo "AUTH0_CLIENT_ID=$AUTH0_CLIENT_ID" >> .env
env:
AUTH0_DOMAIN: ${{ secrets.AUTH0_DOMAIN }}
AUTH0_CLIENT_ID: ${{ secrets.AUTH0_CLIENT_ID }}
- name: Install packages
run: flutter pub get
- name: Analyze code
run: flutter analyze
- name: Run unit tests
run: |
cd test
flutter test unit
flutter test services
- name: Run tests in emulator
uses: reactivecircus/android-emulator-runner@d94c3fbe4fe6a29e4a5ba47c12fb47677c73656b # v2
with:
api-level: 31
target: google_apis
arch: x86_64
force-avd-creation: false
emulator-options: -no-snapshot-save -no-window -gpu swiftshader_indirect -noaudio -no-boot-anim -camera-back none
disable-animations: true
script: cd mobile-app && if adb shell pm list packages | grep -q org.freecodecamp; then adb uninstall org.freecodecamp; fi && flutter drive --driver=test_driver/integration_test.dart --target=integration_test/news_test.dart
- name: Upload screenshots
uses: actions/upload-artifact@0b7f8abb1508181956e8e162db84b466c27e18ce # v3
if: always()
with:
name: screenshots
path: mobile-app/screenshots/
if-no-files-found: error
retention-days: 7