Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
melos #7: drift (#3134)
* Add melos setup and check only set up Dart for now

* Update

* Update]

* Update]

* Update

* Update

* Update

* Fix CHANGELOG

* Update gitignore

* Fix symlink in CHANGELOG

* Add logging to melos

* Update

* Update

* Update

* Update

* Add dio to packages

* Update workflow

* Update

* Update

* Update

* Update

* Update

* Add hive to packages

* Update

* Add file to packages

* Add link to packages

* Update

* Update

* Update

* Update

* Fix test

* Fix test

* Fix test

* Fix test

* Fix test

* Update drift.yml
  • Loading branch information
buenaflor authored Aug 6, 2025
commit 775ac230bbf976e3d0758d36d388a49dc7b3155e
39 changes: 25 additions & 14 deletions .github/workflows/drift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,10 @@ on:
- '!**/class-diagram.svg'
- '.github/workflows/drift.yml'
- '.github/workflows/analyze.yml'
- '.github/actions/flutter-test/**'
- '.github/actions/dart-test/**'
- '.github/actions/coverage/**'
- 'dart/**'
- 'drift/**'
- 'packages/dart/**'
- 'packages/drift/**'

jobs:
cancel-previous-workflow:
Expand All @@ -25,36 +25,47 @@ jobs:
access_token: ${{ github.token }}

build:
name: '${{ matrix.target }} | ${{ matrix.sdk }}'
runs-on: ${{ matrix.target == 'linux' && 'ubuntu' || matrix.target }}-latest
name: '${{ matrix.os }} | ${{ matrix.sdk }}'
runs-on: ${{ matrix.os }}-latest
timeout-minutes: 30
strategy:
fail-fast: false
matrix:
target: [macos, linux, windows]
os: [ubuntu, macos, windows]
sdk: [stable, beta]

steps:
- uses: actions/checkout@v4

- name: Install libsqlite3
if: matrix.target == 'linux'
- name: Install libsqlite3 (Ubuntu)
if: matrix.os == 'ubuntu'
run: sudo apt-get -y install libsqlite3-dev

- uses: ./.github/actions/flutter-test
- name: Install SQLite (macOS)
if: matrix.os == 'macos'
run: brew install sqlite3

- name: Install SQLite (Windows)
if: matrix.os == 'windows'
shell: powershell
run: |
choco install sqlite -y
echo "C:/ProgramData/chocolatey/lib/sqlite/tools" >> $GITHUB_PATH

- uses: ./.github/actions/dart-test
with:
directory: drift
directory: packages/drift
web: 'false'

- uses: ./.github/actions/coverage
if: matrix.target == 'linux' && matrix.sdk == 'stable'
if: matrix.os == 'ubuntu' && matrix.sdk == 'stable'
with:
token: ${{ secrets.CODECOV_TOKEN }}
directory: drift
directory: packages/drift
coverage: sentry_drift
min-coverage: 80

analyze:
uses: ./.github/workflows/analyze.yml
with:
package: drift
sdk: flutter
package: packages/drift
1 change: 0 additions & 1 deletion drift/CHANGELOG.md

This file was deleted.

1 change: 0 additions & 1 deletion drift/dartdoc_options.yaml

This file was deleted.

3 changes: 0 additions & 3 deletions drift/pubspec_overrides.yaml

This file was deleted.

8 changes: 0 additions & 8 deletions drift/test/utils/windows_helper.dart

This file was deleted.

File renamed without changes.
1 change: 1 addition & 0 deletions packages/drift/CHANGELOG.md
File renamed without changes.
File renamed without changes.
File renamed without changes.
1 change: 1 addition & 0 deletions packages/drift/dartdoc_options.yaml
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
File renamed without changes.
4 changes: 1 addition & 3 deletions drift/pubspec.yaml → packages/drift/pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -23,13 +23,11 @@ dependencies:

dev_dependencies:
lints: '>=2.0.0'
flutter_test:
sdk: flutter
test: ^1.26.3
coverage: ^1.3.0
mockito: ^5.1.0
build_runner: ^2.4.6
drift_dev: ^2.13.0
yaml: ^3.1.0 # needed for version match (code and pubspec)
sqlite3_flutter_libs: ^0.5.0
sqlite3: ^2.1.0
archive: ^3.1.2
4 changes: 4 additions & 0 deletions packages/drift/pubspec_overrides.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
# melos_managed_dependency_overrides: sentry
dependency_overrides:
sentry:
path: ../dart
File renamed without changes.
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@

import 'package:drift/drift.dart';
import 'package:drift/native.dart';
import 'package:flutter_test/flutter_test.dart';
import 'package:test/test.dart';
import 'package:mockito/mockito.dart';
import 'package:sentry/sentry.dart';
import 'package:sentry/src/sentry_tracer.dart';
Expand Down
File renamed without changes.
File renamed without changes.
14 changes: 14 additions & 0 deletions packages/drift/test/utils/windows_helper.dart
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
import 'dart:ffi';

DynamicLibrary openOnWindows() {
// Use the system SQLite DLL installed by Chocolatey
try {
// Try to load from system path first
return DynamicLibrary.open('sqlite3.dll');
} catch (e) {
// Fallback to absolute path from Chocolatey installation
return DynamicLibrary.open(
'C:\\ProgramData\\chocolatey\\lib\\sqlite\\tools\\sqlite3.dll',
);
}
}