Skip to content

Add ab test pattern for premium introduction #162

Add ab test pattern for premium introduction

Add ab test pattern for premium introduction #162

Workflow file for this run

name: ci
concurrency:
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
cancel-in-progress: true
on:
push:
branches: [ main, feature/* ]
# pull_request_targetsにはしない。Public repoだからforkされるとsecretが読み込まれる
# NOTE: Dependabotでbuild-ios-debug,build-android-debugでの失敗を避けるために https://docs.github.com/ja/code-security/dependabot/working-with-dependabot/automating-dependabot-with-github-actions#accessing-secrets を参考に必要なdependabot用のsecretが設定されている。なお、prodファイルでもテストに不要のためすべてdevの値が代わりに使用されている
pull_request:
branches: [ main, feature/* ]
jobs:
lint:
runs-on: macos-13
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- run: make secret
- uses: subosito/flutter-action@v2
with:
channel: stable
flutter-version: '3.22.2'
- run: flutter pub get
- run: flutter analyze --no-pub --no-fatal-infos --fatal-warnings
build-ios-debug:
runs-on: macos-13
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: '15.1.0'
- uses: actions/checkout@v1
- name: Prepare firebase config
run: make secret
env:
FILE_FIREBASE_IOS_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_IOS_DEVELOPMENT }}
FILE_FIREBASE_IOS_PRODUCTION: ${{ secrets.FILE_FIREBASE_IOS_PRODUCTION }}
DART_DEFINE_FROM_FILE_DEV: ${{ secrets.DART_DEFINE_FROM_FILE_DEV }}
XCCONFIG_SECRET: ${{ secrets.XCCONFIG_SECRET_DEVELOPMENT }}
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
- run: flutter pub get
- name: Run iOS
run: flutter build ios --debug --no-codesign --target lib/main.dev.dart --dart-define-from-file=environment/dev.json
build-android-debug:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: actions/setup-java@v3
with:
distribution: "zulu"
java-version: '17.0.10+7'
- name: Prepare firebase config
run: make secret
env:
FILE_FIREBASE_ANDROID_DEVELOPMENT: ${{ secrets.FILE_FIREBASE_ANDROID_DEVELOPMENT }}
FILE_FIREBASE_ANDROID_PRODUCTION: ${{ secrets.FILE_FIREBASE_ANDROID_PRODUCTION }}
DART_DEFINE_FROM_FILE_DEV: ${{ secrets.DART_DEFINE_FROM_FILE_DEV }}
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
- run: flutter pub get
- run: flutter build apk --debug --target lib/main.dev.dart --dart-define-from-file=environment/dev.json
test:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
- run: make secret
- run: flutter pub get
- run: flutter test
codegen:
runs-on: macos-latest
if: ${{ !contains(github.event.pull_request.title, '[Skip CI]') }}
steps:
- uses: actions/checkout@v1
- uses: subosito/flutter-action@v2
with:
flutter-version: '3.22.2'
- run: make secret
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: git diff --quiet --exit-code