From d7f0df97cb4d06c4be82df76ad31c95735480ef3 Mon Sep 17 00:00:00 2001 From: kerer Date: Fri, 13 Oct 2023 17:23:27 +0300 Subject: [PATCH] Added CI workflow --- .github/workflows/test.yaml | 53 +++++++++++++++++++++++++++++++++++++ 1 file changed, 53 insertions(+) create mode 100644 .github/workflows/test.yaml diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml new file mode 100644 index 0000000..8bbf734 --- /dev/null +++ b/.github/workflows/test.yaml @@ -0,0 +1,53 @@ +name: Dart CI + +on: + push: + branches: + - master + pull_request: + branches: + - master + +env: + FLUTTER_VERSION: 3 + +jobs: + ci: + name: Continuous integration + runs-on: ubuntu-latest + steps: + # Setup + - uses: actions/checkout@v3 + - name: Setup Flutter + uses: subosito/flutter-action@v2 + with: + flutter-version: ${{ env.FLUTTER_VERSION }} + + # Install dependencies + - name: isar-crdt install dependencies + run: dart pub get + working-directory: packages/isar-crdt + - name: isar-crdt-generator install dependencies + run: dart pub get + working-directory: packages/isar-crdt-generator + - name: isar-crdt-test install dependencies + run: dart pub get + working-directory: packages/isar-crdt-test + + # Formatting + - name: Check formatting + run: dart format -o none --set-exit-if-changed . + + # Linting + - name: Linting + run: dart analyze --fatal-warnings + + # Testing + - name: Test isar-crdt package + working-directory: packages/isar-crdt + run: dart test + - name: E2E tests + working-directory: packages/isar-crdt-test + run: | + dart run build_runner build + dart test