fluffychat/.github/workflows/integrate.yaml

91 lines
2.9 KiB
YAML
Raw Normal View History

2023-07-14 09:50:39 +00:00
name: Pull Request Workflow
2023-07-14 09:04:05 +00:00
2023-08-08 05:41:08 +00:00
on:
pull_request:
merge_group:
2023-07-14 09:04:05 +00:00
jobs:
2023-07-15 00:37:55 +00:00
code_tests:
2023-07-14 09:04:05 +00:00
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-07-15 09:14:38 +00:00
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
2023-07-14 09:10:20 +00:00
- uses: subosito/flutter-action@v2
2023-07-14 09:04:05 +00:00
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
2023-09-05 12:48:18 +00:00
cache: true
2023-07-14 09:04:05 +00:00
- run: flutter pub get
- run: flutter gen-l10n
2023-07-14 09:04:05 +00:00
- 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
2024-02-25 12:55:48 +00:00
- name: Check license compliance
run: dart run license_checker check-licenses -c licenses.yaml --problematic
2023-07-14 09:04:05 +00:00
- run: flutter analyze
- name: Apply google services patch
run: git apply ./scripts/enable-android-google-services.patch
- run: flutter analyze
2023-07-14 09:10:20 +00:00
- run: flutter test
build_debug_apk:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-07-15 09:14:38 +00:00
- 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 }}
2023-09-05 12:48:18 +00:00
cache: true
- run: flutter pub get
- run: flutter build apk --debug
build_debug_web:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-07-15 09:14:38 +00:00
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
2023-09-05 12:48:18 +00:00
cache: true
- run: flutter pub get
- name: Prepare web
run: ./scripts/prepare-web.sh
2023-07-14 09:34:25 +00:00
- run: flutter build web
build_debug_linux:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
2023-07-15 09:14:38 +00:00
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
2023-07-14 09:34:25 +00:00
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
2023-09-05 12:48:18 +00:00
cache: true
2023-07-14 09:34:25 +00:00
- name: Install dependencies
run: sudo apt-get update && sudo apt-get install 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 -y
2023-07-14 09:34:25 +00:00
- run: flutter pub get
2023-07-30 08:32:10 +00:00
- run: flutter build linux --target-platform linux-x64
2023-08-19 06:21:26 +00:00
build_debug_ios:
runs-on: macos-latest
steps:
- uses: actions/checkout@v4
2023-08-19 06:21:26 +00:00
- run: cat .github/workflows/versions.env >> $GITHUB_ENV
- uses: subosito/flutter-action@v2
with:
flutter-version: ${{ env.FLUTTER_VERSION }}
2023-09-05 12:48:18 +00:00
cache: true
2023-08-19 06:21:26 +00:00
- name: Setup Xcode version
uses: maxim-lobanov/setup-xcode@v1.6.0
with:
xcode-version: latest
- run: brew install sqlcipher
2023-08-19 06:21:26 +00:00
- run: flutter pub get
- run: flutter build ios --no-codesign