diff --git a/.github/workflows/pull_request.yaml b/.github/workflows/pull_request.yaml new file mode 100644 index 0000000..d9443b0 --- /dev/null +++ b/.github/workflows/pull_request.yaml @@ -0,0 +1,19 @@ +name: Pull Request Checks + +on: + pull_request: + +jobs: + lint: + runs-on: ubuntu-slim + timeout-minutes: 10 + permissions: + contents: read + steps: + - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 + - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 + with: + channel: stable + cache: true + - uses: invertase/github-action-dart-analyzer@e981b01a458d0bab71ee5da182e5b26687b7101b # v3.0.0 + - run: dart format --output=none --set-exit-if-changed . diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index dcbf24a..973ba1a 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -8,15 +8,11 @@ on: jobs: unit_tests: - runs-on: ubuntu-latest + runs-on: ubuntu-slim timeout-minutes: 10 permissions: contents: read steps: - uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1 - - uses: subosito/flutter-action@fd55f4c5af5b953cc57a2be44cb082c8f6635e8e # v2.21.0 - with: - channel: stable - cache: true - - name: Run Flutter Unit Tests - run: flutter test + - uses: dart-lang/setup-dart@e51d8e571e22473a2ddebf0ef8a2123f0ab2c02c # v1.7.1 + - run: dart test diff --git a/pubspec.yaml b/pubspec.yaml index bae2b1c..342aa49 100644 --- a/pubspec.yaml +++ b/pubspec.yaml @@ -23,8 +23,7 @@ dependencies: web: ^1.0.0 dev_dependencies: - flutter_test: - sdk: flutter + test: ^1.28.0 flutter_lints: ^6.0.0 jnigen: ^0.15.0 ffigen: ^20.1.1 diff --git a/test/output_resize_test.dart b/test/output_resize_test.dart index c46431e..ab2f108 100644 --- a/test/output_resize_test.dart +++ b/test/output_resize_test.dart @@ -1,5 +1,5 @@ -import 'package:flutter_test/flutter_test.dart'; import 'package:platform_image_converter/src/output_resize.dart'; +import 'package:test/test.dart'; void main() { group('ResizeMode', () {