diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml new file mode 100644 index 0000000..f62bc50 --- /dev/null +++ b/.github/workflows/ci.yml @@ -0,0 +1,37 @@ +name: CI + +on: + pull_request: + push: + branches: + - main + +jobs: + format: + name: Format ${{ matrix.package }} + runs-on: ubuntu-latest + strategy: + fail-fast: false + matrix: + include: + - package: core + package_path: packages/drift_sync_core + - package: flutter + package_path: packages/drift_sync_flutter + steps: + - name: Check out repository + uses: actions/checkout@v4 + + - name: Set up Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: 3.38.9 + channel: stable + cache: true + + - name: Resolve dependencies + working-directory: ${{ matrix.package_path }} + run: flutter pub get + + - name: Check formatting + run: dart format --output=none --set-exit-if-changed "${{ matrix.package_path }}"