Skip to content

Add PR checks

Add PR checks #3

Workflow file for this run

name: CI for PRs
on:
pull_request:
paths-ignore:
- "**.md"
branches:
- main
jobs:
ci_checks:
name: CI Checks
runs-on: ubuntu-latest
strategy:
matrix:
package:
- packages/yx_scope
- packages/yx_scope_flutter
- packages/yx_scope_linter
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: '3.27.0'
- name: Install dependencies
run: |
cd ${{ matrix.package }}
flutter pub get
- name: Check formatting
run: |
cd ${{ matrix.package }}
dart format --set-exit-if-changed .
- name: Run linter
run: |
cd ${{ matrix.package }}
flutter analyze
- name: Run tests
if: matrix.package != 'packages/yx_scope_linter'
run: |
cd ${{ matrix.package }}
flutter test