feat: git workflows #4
Workflow file for this run
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
name: Test | |
on: | |
pull_request: | |
# push: | |
# branches: ["main"] | |
# pull_request: | |
# branches: ["main"] | |
jobs: | |
setup-web: | |
uses: ./.github/workflows/flutter-setup.yml | |
with: | |
destination: ubuntu-latest | |
setup-android: | |
uses: ./.github/workflows/flutter-setup.yml | |
with: | |
destination: ubuntu-latest | |
setup-macos: | |
uses: ./.github/workflows/flutter-setup.yml | |
with: | |
destination: macos-latest | |
test-web: | |
runs-on: ubuntu-latest | |
needs: setup-web | |
steps: | |
- name: run web tests | |
run: flutter test -r expanded | |
test-android: | |
runs-on: ubuntu-latest | |
needs: setup-android | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Set up JDK 17 | |
uses: actions/setup-java@v3 | |
with: | |
java-version: '17' | |
distribution: 'temurin' | |
- name: Setup Android SDK | |
uses: android-actions/setup-android@v3 | |
- name: Setup Nodejs | |
uses: actions/setup-node@v4 | |
with: | |
node-version: lts/* | |
- name: Run Gradle | |
run: example/android/gradlew | |
- name: Run Tests | |
run: make test-android | |
test-ios: | |
runs-on: macos-latest | |
needs: setup-macos | |
steps: | |
- uses: actions/checkout@v3 | |
- uses: SwiftyLab/setup-swift@latest | |
with: | |
swift-version: '5.10.0' | |
- name: Get Swift Version | |
run: swift --version | |
- name: Get Xcode version | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app | |
run: xcodebuild -version | |
- name: Cache Pods | |
id: pods | |
uses: actions/cache@v4 | |
with: | |
path: example/ios/Pods | |
key: pods-cache--${{ hashFiles('example/ios/podfile.lock') }} | |
- name: Cache Xcode DerivedData | |
uses: irgaly/[email protected] | |
with: | |
key: xcode-deriveddata | |
- run: cd example/ios; pod install; cd ../.. | |
- name: Run Tests | |
env: | |
DEVELOPER_DIR: /Applications/Xcode_15.4.app | |
run: make test-ios | |