iosWebViewFix/.github/workflows/flutter-drive.yml

125 lines
4.1 KiB
YAML
Raw Normal View History

# Name of your workflow.
name: flutter drive
on:
# Trigger the workflow on push or pull request,
# but only for the main branch
push:
branches:
2021-02-11 09:28:11 +00:00
- master
2021-02-11 11:22:14 +00:00
pull_request:
branches:
- master
# A workflow run is made up of one or more jobs.
jobs:
# id of job, a string that is unique to the "jobs" node above.
2021-02-11 09:22:54 +00:00
ios_integration_test_drive:
# Creates a build matrix for your jobs. You can define different
# variations of an environment to run each job in.
strategy:
# A set of different configurations of the virtual
# environment.
# matrix:
# When set to true, GitHub cancels all in-progress jobs if any
# matrix job fails.
fail-fast: false
# The type of machine to run the job on.
runs-on: macOS-latest
# Contains a sequence of tasks.
steps:
# A name for your step to display on GitHub.
- name: "Start Simulator"
run: |
xcrun simctl list
2021-02-11 09:36:24 +00:00
xcrun simctl create Flutter-iPhone com.apple.CoreSimulator.SimDeviceType.iPhone-12 com.apple.CoreSimulator.SimRuntime.iOS-14-3 | xargs xcrun simctl boot
# The branch or tag ref that triggered the workflow will be
# checked out.
# https://github.com/actions/checkout
- uses: actions/checkout@v2
2021-02-11 10:11:27 +00:00
# Sets up cache
- name: Cache multiple paths
uses: actions/cache@v2
with:
path: |
~/.pub-cache
**/node_modules
2021-02-11 10:15:48 +00:00
key: ${{ runner.os }}-pub-and-node_modules
# Sets up a flutter environment.
# https://github.com/marketplace/actions/flutter-action
2021-02-11 09:52:12 +00:00
- name: "Install Flutter"
uses: subosito/flutter-action@v1.4.0
with:
2021-02-11 09:31:27 +00:00
channel: 'dev' # 'stable' or 'dev' or 'beta'
- name: "Change Flutter channel to master"
run: |
flutter channel master
flutter upgrade
2021-02-11 09:28:11 +00:00
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: "Install npm dependencies"
run: |
cd ./nodejs_server_test_auth_basic_and_ssl
npm install
cd ..
2021-02-11 09:22:54 +00:00
- name: "Run iOS Flutter Integration Test"
run: |
flutter pub get
2021-02-11 09:50:27 +00:00
flutter devices
./scripts/test.sh $(ipconfig getifaddr en0)
# id of job, a string that is unique to the "jobs" node above.
android_integration_test_drive:
# Creates a build matrix for your jobs. You can define different
# variations of an environment to run each job in.
strategy:
# A set of different configurations of the virtual
# environment.
# matrix:
# When set to true, GitHub cancels all in-progress jobs if any
# matrix job fails.
fail-fast: false
# The type of machine to run the job on.
runs-on: macOS-latest
# Contains a sequence of tasks.
steps:
# The branch or tag ref that triggered the workflow will be
# checked out.
# https://github.com/actions/checkout
- uses: actions/checkout@v2
2021-02-11 10:11:27 +00:00
# Sets up cache
- name: Cache multiple paths
uses: actions/cache@v2
2021-02-11 09:52:12 +00:00
with:
2021-02-11 10:11:27 +00:00
path: |
~/.pub-cache
**/node_modules
2021-02-11 10:15:48 +00:00
key: ${{ runner.os }}-pub-and-node_modules
2021-02-11 09:50:27 +00:00
# Sets up a flutter environment.
# https://github.com/marketplace/actions/flutter-action
2021-02-11 09:52:12 +00:00
- name: "Install Flutter"
uses: subosito/flutter-action@v1.4.0
2021-02-11 09:50:27 +00:00
with:
channel: 'dev' # 'stable' or 'dev' or 'beta'
- name: "Change Flutter channel to master"
run: |
flutter channel master
flutter upgrade
- uses: actions/setup-node@v2
with:
node-version: '14'
- name: "Install npm dependencies"
run: |
cd ./nodejs_server_test_auth_basic_and_ssl
npm install
cd ..
2021-02-11 10:11:27 +00:00
- name: "Install flutter dependencies"
2021-02-11 09:50:27 +00:00
run: |
flutter pub get
2021-02-11 10:11:27 +00:00
# Sets up android emulator
- name: "Run Android Flutter Integration Test"
uses: ReactiveCircus/android-emulator-runner@v2.14.3
with:
2021-02-11 11:22:14 +00:00
api-level: 29
target: default
2021-02-11 10:11:27 +00:00
avd-name: Flutter-Android
script: ./scripts/test.sh $(ipconfig getifaddr en0)