Merge pull request #9 from Syntraksoftware/front-back-alignment #38
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: Tests | |
| on: | |
| push: | |
| branches: [ main, develop ] | |
| pull_request: | |
| branches: [ main, develop ] | |
| jobs: | |
| backend-tests: | |
| name: Backend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: '3.11' | |
| - name: Install dependencies | |
| run: | | |
| cd main-backend | |
| pip install -r requirements.txt -r requirements-test.txt | |
| - name: Run tests with coverage | |
| run: | | |
| cd main-backend | |
| pytest --cov=app --cov-report=xml --cov-report=term | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./main-backend/coverage.xml | |
| flags: backend | |
| name: backend-coverage | |
| frontend-tests: | |
| name: Frontend Tests | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| flutter-version: '3.38.6' | |
| - name: Install dependencies | |
| run: | | |
| cd frontend | |
| flutter pub get | |
| - name: Run tests with coverage | |
| run: | | |
| cd frontend | |
| flutter test --coverage | |
| continue-on-error: false | |
| timeout-minutes: 10 | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v4 | |
| with: | |
| files: ./frontend/coverage/lcov.info | |
| flags: frontend | |
| name: frontend-coverage | |