fix: pre-publish quality fixes for pub.dev v1.0.0 #2
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: | |
| test: | |
| name: Run Tests | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| flutter-channel: [stable, beta] | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@v4 | |
| - name: Setup Flutter | |
| uses: subosito/flutter-action@v2 | |
| with: | |
| channel: ${{ matrix.flutter-channel }} | |
| cache: true | |
| - name: Get dependencies | |
| run: flutter pub get | |
| - name: Verify formatting | |
| run: dart format --set-exit-if-changed . | |
| if: matrix.os == 'ubuntu-latest' && matrix.flutter-channel == 'stable' | |
| - name: Analyze code | |
| run: flutter analyze | |
| - name: Run tests | |
| run: flutter test | |
| - name: Upload test results | |
| if: failure() | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: test-results-${{ matrix.os }}-${{ matrix.flutter-channel }} | |
| path: test/**/*.dart |