Add PR checks #5
Workflow file for this run
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: CI for PRs | |
on: | |
pull_request: | |
paths-ignore: | |
- "**.md" | |
branches: | |
- main | |
jobs: | |
ci_checks: | |
name: CI Checks | |
runs-on: ubuntu-latest | |
strategy: | |
matrix: | |
# Check the library against the most recent version and the previous minor version | |
flutter-version: [3.27.1, 3.24.5] | |
package: | |
- packages/yx_scope | |
- packages/yx_scope_flutter | |
- packages/yx_scope_linter | |
defaults: | |
run: | |
working-directory: ${{ matrix.package }} | |
shell: bash | |
steps: | |
- name: Checkout code | |
uses: actions/checkout@v4 | |
- name: Set up Flutter | |
uses: subosito/flutter-action@v2 | |
with: | |
flutter-version: ${{ matrix.flutter-version }} | |
- name: Install dependencies | |
run: flutter pub get | |
- name: Check formatting | |
run: dart format --set-exit-if-changed . | |
- name: Run linter | |
run: flutter analyze | |
- name: Run tests | |
if: matrix.package != 'packages/yx_scope_linter' | |
run: flutter test |