Skip to content

Commit

Permalink
Build CI: Trigger when have a PR merged to staging branch
Browse files Browse the repository at this point in the history
  • Loading branch information
devnta committed Jan 25, 2024
1 parent 85d421a commit fe24578
Show file tree
Hide file tree
Showing 2 changed files with 32 additions and 1 deletion.
31 changes: 31 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,31 @@
name: Run test
on:
pull_request:
branches:
- staging
jobs:
if_merged:
if: github.event.pull_request.merged == true
name: Test on iOS simulator
runs-on: macOS-latest
steps:
- name: Checkout
uses: actions/checkout@v4.1.1
- name: Java setup
uses: actions/setup-java@v4.0.0
with:
java-version: '17'
distribution: 'zulu'
- name: Flutter setup
uses: subosito/flutter-action@v2.12.0
with:
channel: 'stable'
- name: Create iOS simulator
uses: futureware-tech/simulator-action@v3
with:
model: 'iPhone 14'
- run: flutter doctor -v
- run: flutter pub get
- run: flutter pub run build_runner build --delete-conflicting-outputs
- run: flutter test --flavor=dev
- run: flutter test integration_test --flavor=dev
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
## The Flutter project integrate CI-CD
Todo ...
![Flutter CI-CD demo](https://github.com/ntaworking/flutter_ci_cd/actions/workflows/main.yml/badge.svg)

0 comments on commit fe24578

Please sign in to comment.