Skip to content

Commit

Permalink
feat: add Dart github action #7
Browse files Browse the repository at this point in the history
  • Loading branch information
slightfoot committed Dec 20, 2024
1 parent ab569f6 commit f7a1272
Show file tree
Hide file tree
Showing 2 changed files with 54 additions and 2 deletions.
52 changes: 52 additions & 0 deletions .github/workflows/main.yaml
Original file line number Diff line number Diff line change
@@ -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
4 changes: 2 additions & 2 deletions melos.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit f7a1272

Please # to comment.