Simplify code #679
Workflow file for this run
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
| # Ultralytics 🚀 AGPL-3.0 License - https://ultralytics.com/license | |
| # Continuous Integration (CI) GitHub Actions tests | |
| name: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| permissions: | |
| contents: read | |
| checks: write | |
| pull-requests: write | |
| jobs: | |
| tests: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - uses: subosito/flutter-action@v2 | |
| with: | |
| channel: stable | |
| cache: true | |
| - name: Install dependencies | |
| run: | | |
| flutter pub get | |
| sudo apt-get update | |
| sudo apt-get install -y xvfb | |
| - name: Create test .env file | |
| run: | | |
| echo "# Test environment variables" > .env | |
| echo "API_URL=https://test-api.ultralytics.com" >> .env | |
| echo "FIREBASE_API_KEY=test-key" >> .env | |
| - name: Run tests with coverage | |
| run: | | |
| xvfb-run flutter test --coverage | |
| - name: Dart publish dry-run | |
| run: | | |
| dart pub publish --dry-run | |
| - name: Upload Coverage Reports to CodeCov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| fail_ci_if_error: true | |
| name: flutter-codecov | |
| verbose: false |