From f7a12724fa8842710f927008c082ab529129801f Mon Sep 17 00:00:00 2001 From: Simon Lightfoot Date: Fri, 20 Dec 2024 19:40:21 +0000 Subject: [PATCH] feat: add Dart github action #7 --- .github/workflows/main.yaml | 52 +++++++++++++++++++++++++++++++++++++ melos.yaml | 4 +-- 2 files changed, 54 insertions(+), 2 deletions(-) create mode 100644 .github/workflows/main.yaml diff --git a/.github/workflows/main.yaml b/.github/workflows/main.yaml new file mode 100644 index 0000000..e24bdf0 --- /dev/null +++ b/.github/workflows/main.yaml @@ -0,0 +1,52 @@ +name: Push/PR Checks + +on: + push: + branches: [ "main" ] + pull_request: + branches: [ "main" ] + +jobs: + pr_check: + name: PR Check Build + runs-on: ubuntu-latest + + steps: + - name: Checkout repo (self) + uses: actions/checkout@v4 + + - name: Install flutter + uses: subosito/flutter-action@v2 + with: + channel: 'stable' + architecture: '${{ runner.arch }}' + cache: 'false' + + - name: Install top-level dependencies + run: dart pub get + + - name: Install melos + run: dart pub global activate melos + + - name: Run melos + run: melos bs && melos run get + + - name: Verify formatting of clerk_auth + run: dart format --output=none --set-exit-if-changed . + working-directory: packages/clerk_auth + + - name: Verify formatting of clerk_flutter + run: dart format --output=none --set-exit-if-changed . + working-directory: packages/clerk_flutter + + - name: Analyze clerk_auth + run: dart analyze + working-directory: packages/clerk_auth + + - name: Analyze clerk_flutter + run: flutter analyze + working-directory: packages/clerk_flutter + + - name: Run tests in clerk_auth + run: dart test + working-directory: packages/clerk_auth diff --git a/melos.yaml b/melos.yaml index a0c0f13..0e7754a 100644 --- a/melos.yaml +++ b/melos.yaml @@ -19,13 +19,13 @@ scripts: get: name: Get all description: Run pub get in all packages - run: melos exec -o -- dart pub get + run: melos exec -o -- flutter pub get # Pub upgrade all packages upgrade: name: Upgrade all description: Run pub upgrade in all packages - run: melos exec -o -- dart pub upgrade + run: melos exec -o -- flutter pub upgrade # Build runner (code generation) brunner: