Various tweaks to satify linter #387
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# This is a basic workflow to help you get started with Actions | |
name: tests | |
# Controls when the action will run. | |
on: | |
# Triggers the workflow on push or pull request events but only for the main branch | |
push: | |
branches: | |
- '*' | |
pull_request: | |
branches: | |
- '*' | |
# Allows you to run this workflow manually from the Actions tab | |
workflow_dispatch: | |
# Jobs that runs tests and build for Android and iOS | |
jobs: | |
android_build: | |
name: Build Android APK and run tests/analysis | |
runs-on: ubuntu-latest | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: actions/setup-java@v4 | |
with: | |
distribution: 'temurin' | |
java-version: '17' | |
- name: Setup Flutter SDK | |
uses: flutter-actions/setup-flutter@v3 | |
with: | |
channel: stable | |
version: 3.22.0 | |
- name: Create dummy API keys | |
run: | | |
touch keys/server.key | |
bash keys/gen_keys.sh | |
echo ${{ secrets.KEY_PROPERTIES }} > android/key.properties | |
- name: Install dependencies | |
run: | | |
cd ..; git clone https://github.com/mideind/EmblaCore; mv EmblaCore embla_core; cd EmblaFlutterApp | |
cd ..; git clone https://github.com/mideind/flutter_snowboy; cd EmblaFlutterApp | |
flutter config --no-analytics | |
flutter pub get --suppress-analytics | |
# Android build runs the tests. No need to run the same tests again on iOS. | |
- name: Run tests | |
run: | | |
flutter test | |
dart analyze lib/ | |
- name: Build APK | |
run: | | |
bash build_apk.sh | |
- name: Slack notification | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: Integration Testing | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required | |
if: failure() # Pick up event if the job fails | |
ios_build: | |
name: Build iOS IPA | |
runs-on: macos-13 | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Setup Flutter SDK | |
uses: flutter-actions/setup-flutter@v3 | |
with: | |
channel: stable | |
version: 3.22.0 | |
- name: Create dummy API keys | |
run: | | |
touch keys/gaccount.json | |
touch keys/query_api.key | |
bash keys/gen_keys.sh | |
- name: Install dependencies | |
run: | | |
cd ..; git clone https://github.com/mideind/EmblaCore; mv EmblaCore embla_core; cd EmblaFlutterApp | |
cd ..; git clone https://github.com/mideind/flutter_snowboy; cd EmblaFlutterApp | |
flutter config --no-analytics | |
flutter pub get --suppress-analytics | |
gem install xcpretty | |
- name: Build iOS IPA | |
run: | | |
bash build_ipa.sh | |
- name: Slack notification | |
uses: 8398a7/action-slack@v3 | |
with: | |
status: ${{ job.status }} | |
author_name: Integration Testing | |
env: | |
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # required | |
if: failure() # Pick up event if the job fails |