style: apply dart format to satisfy CI #60
This file contains hidden or 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: 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 |