* fix: fix dart formatting for CI * fix: sorted imports, updated deprecated flutter functions * fix: format files * fix: format files * feat: replace syncfusion flutter package with excel flutter package * fix: don't run enable google services patch in CI * fix: update iOS supported platforms for enable ios build script * fix: commented out linux build in integrate CI
105 lines
3.6 KiB
YAML
105 lines
3.6 KiB
YAML
name: Pull Request Workflow
|
|
|
|
on:
|
|
pull_request:
|
|
merge_group:
|
|
|
|
jobs:
|
|
code_tests:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
cache: true
|
|
- run: flutter pub get
|
|
- run: flutter gen-l10n
|
|
- name: Check formatting
|
|
run: dart format lib/ test/ --set-exit-if-changed
|
|
- name: Check import formatting
|
|
run: dart run import_sorter:main --no-comments --exit-if-changed
|
|
- name: Check license compliance
|
|
run: dart run license_checker check-licenses -c licenses.yaml --problematic
|
|
- run: flutter analyze
|
|
# #Pangea - Commented out the following lines, we already have fcm enabled by default
|
|
# - name: Apply google services patch
|
|
# run: git apply ./scripts/enable-android-google-services.patch
|
|
# Pangea#
|
|
- run: flutter analyze
|
|
- run: flutter test
|
|
|
|
build_apk:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: actions/setup-java@v4
|
|
with:
|
|
java-version: ${{ env.JAVA_VERSION }}
|
|
distribution: "zulu"
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
cache: false
|
|
- run: flutter pub get
|
|
- name: Free Disk Space (Ubuntu)
|
|
uses: jlumbroso/free-disk-space@main
|
|
with:
|
|
# this might remove tools that are actually needed,
|
|
# if set to "true" but frees about 6 GB
|
|
tool-cache: false
|
|
android: false
|
|
- run: flutter build apk --debug
|
|
|
|
build_web:
|
|
runs-on: ubuntu-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
cache: false
|
|
- run: flutter pub get
|
|
- name: Prepare web
|
|
run: ./scripts/prepare-web.sh
|
|
- run: flutter build web
|
|
|
|
# #Pangea
|
|
# commented out because we do not build Pangea Chat to linux
|
|
# build_debug_linux:
|
|
# strategy:
|
|
# matrix:
|
|
# arch: [ x64, arm64 ]
|
|
# runs-on: ${{ matrix.arch == 'arm64' && 'self-hosted' || 'ubuntu-latest'}}
|
|
# steps:
|
|
# - uses: actions/checkout@v4
|
|
# - run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
# - name: Install dependencies
|
|
# run: sudo apt-get update && sudo apt-get install git wget curl clang cmake ninja-build pkg-config libgtk-3-dev libblkid-dev liblzma-dev libjsoncpp-dev cmake-data libsecret-1-dev libsecret-1-0 librhash0 libssl-dev libwebkit2gtk-4.1-dev -y
|
|
# - name: Install Flutter
|
|
# run: |
|
|
# git clone --branch ${{ env.FLUTTER_VERSION }} https://github.com/flutter/flutter.git
|
|
# ./flutter/bin/flutter doctor
|
|
# - run: ./flutter/bin/flutter pub get
|
|
# - run: ./flutter/bin/flutter build linux --target-platform linux-${{ matrix.arch }}
|
|
# Pangea#
|
|
|
|
build_debug_ios:
|
|
runs-on: macos-latest
|
|
steps:
|
|
- uses: actions/checkout@v4
|
|
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
|
|
- uses: subosito/flutter-action@v2
|
|
with:
|
|
flutter-version: ${{ env.FLUTTER_VERSION }}
|
|
cache: true
|
|
- name: Setup Xcode version
|
|
uses: maxim-lobanov/setup-xcode@v1.6.0
|
|
with:
|
|
xcode-version: latest
|
|
- run: brew install sqlcipher
|
|
- run: flutter pub get
|
|
- run: flutter build ipa --no-codesign
|