Skip to content

style: apply dart format to satisfy CI #60

style: apply dart format to satisfy CI

style: apply dart format to satisfy CI #60

Workflow file for this run

name: Run Test Cases
on:
push:
branches: [master]
pull_request:
branches: [master]
jobs:
check_up_to_date:
name: Checkout Repository
runs-on: ubuntu-latest
strategy:
matrix:
sdk: [stable]
steps:
- name: Checkout Code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Fetch all branches
run: git fetch origin
- name: Check if branch is up-to-date with master
run: |
# Compare the current branch with the master branch
if git merge-base --is-ancestor origin/master HEAD; then
echo "The current branch is up-to-date with master."
else
echo "The current branch is not up-to-date with master."
exit 1
fi
setup_and_test:
name: Setup Dart and Run Test Cases
runs-on: ubuntu-latest
needs: check_up_to_date
strategy:
matrix:
sdk: [stable]
steps:
- name: Checkout Code
uses: actions/checkout@v4
- name: Set up Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{ matrix.sdk }}
- name: Set up Flutter SDK
uses: subosito/flutter-action@v2
with:
channel: stable
- name: Install dependencies
run: flutter pub get
- name: Run Dart Analyzer (Lint)
run: dart analyze
- name: Run Dart Tests
run: dart test