-
Notifications
You must be signed in to change notification settings - Fork 3
58 lines (45 loc) · 1.24 KB
/
ci.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
50
51
52
53
54
55
56
57
58
name: CI
on:
push:
paths:
- lib/**
- pubspec.yaml
- .github/workflows/**
- test/**
branches:
- "!master"
pull_request:
workflow_call:
workflow_dispatch:
jobs:
test:
name: flutter test
runs-on: ubuntu-latest
steps:
- name: Checkout to repository
uses: actions/checkout@v4
- name: Setup Flutter
uses: subosito/flutter-action@v2
with:
channel: 'stable'
cache: true
cache-key: flutter
cache-path: ${{ runner.tool_cache }}/flutter
- name: Disable Analytics
run: flutter config --no-analytics
- name: Run Flutter Doctor
run: flutter doctor --verbose
- name: Populate sentry dsn
run: |
echo "${{ secrets.SENTRY_DSN_DART_FILE }}" | base64 --decode > ${{env
.SENTRY_DSN_PATH}}
- name: Run pub get
run: flutter pub get
- name: Run flutter analyzer
run: flutter analyze --congratulate --fatal-infos --fatal-warnings --no-pub
- name: Ensure the Dart code is formatted correctly
run: flutter format --set-exit-if-changed --dry-run .
- name: Run Tests
run: flutter test
env:
SENTRY_DSN_PATH: "./lib/sentry_dsn.dart"