feat: implement automatic crash reporting #38
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
| name: "[flutter] Test Nativebrik SDK" | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: [ main ] | |
| paths-ignore: | |
| - .github/workflows/e2e.yaml | |
| - .github/workflows/publish.yaml | |
| - .gitignore | |
| - README.md | |
| pull_request: | |
| branches: [ main ] | |
| paths-ignore: | |
| - .github/workflows/e2e.yaml | |
| - .github/workflows/publish.yaml | |
| - .gitignore | |
| - README.md | |
| jobs: | |
| test: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@08eba0b27e820071cde6df949e0beb9ba4906955 # v4.3.0 | |
| - name: Set up Flutter | |
| uses: ./.github/actions/setup-flutter | |
| - name: Check version consistency | |
| run: | | |
| # Extract version from pubspec.yaml | |
| PUBSPEC_VERSION=$(grep '^version:' pubspec.yaml | sed 's/version: //' | tr -d ' ') | |
| # Extract version from lib/version.dart | |
| VERSION_DART=$(grep 'const String nativebrikFlutterSdkVersion' lib/version.dart | sed "s/.*'\(.*\)'.*/\1/") | |
| echo "pubspec.yaml version: $PUBSPEC_VERSION" | |
| echo "lib/version.dart version: $VERSION_DART" | |
| if [ "$PUBSPEC_VERSION" != "$VERSION_DART" ]; then | |
| echo "Error: Version mismatch between pubspec.yaml ($PUBSPEC_VERSION) and lib/version.dart ($VERSION_DART)" | |
| echo "Please run 'make bump-version VERSION=x.y.z' to update both versions consistently" | |
| exit 1 | |
| fi | |
| echo "Version consistency check passed" | |
| - name: Run tests | |
| run: flutter test | |
| - name: Validate package | |
| run: dart pub publish --dry-run |