Skip to content

Commit

Permalink
Add CI step for test build
Browse files Browse the repository at this point in the history
  • Loading branch information
IniZio committed Mar 21, 2024
1 parent 019d410 commit b56a3a9
Showing 1 changed file with 55 additions and 1 deletion.
56 changes: 55 additions & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,59 @@ on:
- '!gh-pages'

jobs:
test-ios:
runs-on: macos-13
if: ${{ github.event_name == 'pull_request' }}
defaults:
run:
working-directory: "./example"
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: subosito/flutter-action@v2
with:
# Use the latest stable release
flutter-version: '3.x'
channel: 'stable'
- run: flutter pub get
- run: flutter test
- run: flutter analyze --no-fatal-infos
- run: dart format --set-exit-if-changed lib
- run: flutter build ipa --no-codesign

test-android:
runs-on: macos-12
if: ${{ github.event_name == 'pull_request' }}
defaults:
run:
working-directory: "./example"
env:
ANDROID_SDK_VERSIONS: |
platform-tools
tools
emulator
build-tools;29.0.2
platforms;android-31
steps:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16
- uses: subosito/flutter-action@v2
with:
# Use the latest stable release
flutter-version: '3.x'
channel: 'stable'
- run: echo "$ANDROID_HOME/tools/bin" >> $GITHUB_PATH
- run: sdkmanager $ANDROID_SDK_VERSIONS
- run: flutter pub get
- run: flutter test
- run: flutter analyze --no-fatal-infos
- run: dart format --set-exit-if-changed lib
- run: flutter build apk --debug

deploy:
runs-on: ubuntu-22.04
steps:
Expand All @@ -36,8 +89,9 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_dir: ./doc/api

deploy-ios:
runs-on: macos-12
runs-on: macos-13
needs: "deploy"
if: ${{ github.ref == 'refs/heads/main' }}
defaults:
Expand Down

0 comments on commit b56a3a9

Please sign in to comment.