-
Notifications
You must be signed in to change notification settings - Fork 0
49 lines (47 loc) · 1.42 KB
/
continuous-integration.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
name: Continuous Integration
on:
push:
branches: ["main"]
paths:
- .github/workflows/continuous-integration.yml
- app/**
- packages/**
pull_request:
branches: ["main"]
paths:
- .github/workflows/continuous-integration.yml
- app/**
- packages/**
jobs:
continuous-integration:
runs-on: ubuntu-latest
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
dsfr:
- 'packages/dsfr.dart/**'
- name: 🐦 Install flutter
uses: subosito/flutter-action@v2
with:
cache: true
channel: stable
flutter-version-file: app/pubspec.yaml
- name: ✅ Check app (format, lint, tests)
run: |
cd app
dart format $(find . -name '*.dart' -not -name '*.g.dart') --set-exit-if-changed
flutter analyze --fatal-infos --fatal-warnings
flutter test --test-randomize-ordering-seed random
cd -
- name: ✅ Check dsfr (format, lint, tests)
if: steps.filter.outputs.dsfr == 'true'
run: |
cd packages/dsfr.dart
dart format $(find . -name '*.dart' -not -name '*.g.dart') --set-exit-if-changed
flutter analyze --fatal-infos --fatal-warnings
flutter test --test-randomize-ordering-seed random
cd -