From 1ca0f730c2ac38f0739a9fc20d6a2c4080baa011 Mon Sep 17 00:00:00 2001 From: sBubshait Date: Wed, 16 Jul 2025 15:04:12 +0300 Subject: [PATCH] feat: implement CI/CD with testing and building --- .github/workflows/firebase-hosting-merge.yml | 23 +++++++++++++++++--- 1 file changed, 20 insertions(+), 3 deletions(-) diff --git a/.github/workflows/firebase-hosting-merge.yml b/.github/workflows/firebase-hosting-merge.yml index 592a46b..da8032a 100644 --- a/.github/workflows/firebase-hosting-merge.yml +++ b/.github/workflows/firebase-hosting-merge.yml @@ -10,9 +10,26 @@ jobs: build_and_deploy: runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 - - run: flutter build web - - uses: FirebaseExtended/action-hosting-deploy@v0 + - name: Checkout code + uses: actions/checkout@v3 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: '3.19.0' + channel: stable + + - name: Install dependencies + run: flutter pub get + + - name: Run tests + run: flutter test + + - name: Build Flutter Web + run: flutter build web --release + + - name: Deploy to Firebase Hosting + uses: FirebaseExtended/action-hosting-deploy@v0 with: repoToken: ${{ secrets.GITHUB_TOKEN }} firebaseServiceAccount: ${{ secrets.FIREBASE_SERVICE_ACCOUNT_WESALAPP_BC676 }}