Skip to content

Commit

Permalink
bumped to version 3.0.0
Browse files Browse the repository at this point in the history
  • Loading branch information
nixrajput committed Sep 8, 2024
1 parent 47b253c commit 97762f9
Show file tree
Hide file tree
Showing 2 changed files with 50 additions and 36 deletions.
45 changes: 26 additions & 19 deletions .github/workflows/test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,23 +2,41 @@ name: Run Test Cases

on:
push:
branches: [ master ]
branches: [master]
pull_request:
branches: [ master ]
branches: [master]

jobs:
checkout:
check_up_to_date:
name: Checkout Repository
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

setup-flutter:
name: Setup Flutter
with:
fetch-depth: 0 # Fetch all history so we can compare

- 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 Flutter and Run Test Cases
runs-on: ubuntu-latest
needs: checkout
needs: check_up_to_date
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Flutter SDK
uses: subosito/flutter-action@v2
with:
Expand All @@ -28,19 +46,8 @@ jobs:
- name: Run Flutter doctor
run: flutter doctor -v

- name: Checkout Code
uses: actions/checkout@v3

- name: Run Flutter Analyzer (Lint)
run: flutter analyze

test:
name: Run Test Cases
runs-on: ubuntu-latest
needs: setup-flutter
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Run Flutter Tests
run: flutter test
run: flutter test
41 changes: 24 additions & 17 deletions .github/workflows/web.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,21 +2,39 @@ name: Publish to GitHub Pages

on:
push:
branches: [ master ]
branches: [master]

jobs:
checkout:
check_up_to_date:
name: Checkout Repository
runs-on: ubuntu-latest
steps:
- name: Checkout Code
uses: actions/checkout@v4

setup-flutter:
name: Setup Flutter
with:
fetch-depth: 0 # Fetch all history so we can compare

- 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_deploy:
name: Setup Flutter and Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: checkout
needs: check_up_to_date
steps:
- name: Checkout Code
uses: actions/checkout@v3

- name: Install Flutter SDK
uses: subosito/flutter-action@v2
with:
Expand All @@ -26,23 +44,12 @@ jobs:
- name: Check Flutter Version
run: flutter --version

- name: Checkout Code
uses: actions/checkout@v3

- name: Get Flutter Dependencies
run: flutter pub get

- name: Run Flutter Analyzer (Lint)
run: flutter analyze

deploy:
name: Deploy to GitHub Pages
runs-on: ubuntu-latest
needs: setup-flutter
steps:
- name: Checkout Code
uses: actions/checkout@v4

- name: Deploy to GitHub Pages
uses: bluefireteam/flutter-gh-pages@v8
with:
Expand Down

0 comments on commit 97762f9

Please sign in to comment.