From fcf45c538b097b172374c45f2d252a302097b511 Mon Sep 17 00:00:00 2001 From: Paul Kepinski Date: Mon, 4 Nov 2024 10:31:54 +0100 Subject: [PATCH] Add test CI (#24) --- .github/workflows/ci.yml | 8 ++++++++ melos.yaml | 7 ++++++- packages/sane/test/sane_backend_test.dart | 11 ----------- packages/sane/test/sane_test.dart | 7 +++++++ 4 files changed, 21 insertions(+), 12 deletions(-) delete mode 100644 packages/sane/test/sane_backend_test.dart create mode 100644 packages/sane/test/sane_test.dart diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 5b1eab0..5ff0b54 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -29,3 +29,11 @@ jobs: - uses: subosito/flutter-action@v2 - uses: bluefireteam/melos-action@v3 - run: melos run format-check + + test: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + - uses: subosito/flutter-action@v2 + - uses: bluefireteam/melos-action@v3 + - run: melos run test diff --git a/melos.yaml b/melos.yaml index 41bbcf2..a773091 100644 --- a/melos.yaml +++ b/melos.yaml @@ -4,4 +4,9 @@ packages: - packages/** scripts: - format-check: melos exec dart format . --set-exit-if-changed + format-check: + run: melos exec dart format . --set-exit-if-changed + description: "Run dart format in all packages" + test: + run: melos exec dart test . + description: "Run dart test in all packages" diff --git a/packages/sane/test/sane_backend_test.dart b/packages/sane/test/sane_backend_test.dart deleted file mode 100644 index 9772927..0000000 --- a/packages/sane/test/sane_backend_test.dart +++ /dev/null @@ -1,11 +0,0 @@ -// import 'package:test/test.dart'; - -// void main() { -// group('A group of tests', () { -// setUp(() { -// // Additional setup goes here. -// }); - -// test('First Test', () {}); -// }); -// } diff --git a/packages/sane/test/sane_test.dart b/packages/sane/test/sane_test.dart new file mode 100644 index 0000000..60304d3 --- /dev/null +++ b/packages/sane/test/sane_test.dart @@ -0,0 +1,7 @@ +import 'package:test/test.dart'; + +void main() { + group('Void group of tests', () { + test('Void test', () {}); + }); +}