-
-
Notifications
You must be signed in to change notification settings - Fork 50
81 lines (68 loc) · 2.54 KB
/
ci.yml
File metadata and controls
81 lines (68 loc) · 2.54 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
name: "Continuous Integration"
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
ci:
name: "🚀 CI"
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v4
- name: 🐦 Setup Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: 3.35.3
channel: stable
cache: true
- name: 📦 Install Dependencies
run: |
flutter pub global activate very_good_cli
flutter pub global activate coverage
- name: 🦄 Bootstrap
run: bash ./scripts/bootstrap.bash
- name: Install DCM
uses: CQLabs/setup-dcm@v2
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
- name: ✨ Check Formatting
run: bash ./scripts/format.bash
- name: 🕵️ Analyze
run: bash ./scripts/analyze.bash
# Remove this step if you don't use Dart Code Metrics
- name: 🕵️ Analyze with DCM
run: dcm analyze . -r github
# ———————————————————————————————————————————————————————
# RUN TESTS + COVERAGE
# ———————————————————————————————————————————————————————
- name: 🧪 Run Tests
run: bash ./scripts/test.bash
- name: 📥 Upload test report
uses: actions/upload-artifact@v4
if: (success() || failure()) && ${{ github.actor != 'dependabot[bot]' }}
with:
name: test-results
path: reports/tests.json
# ———————————————————————————————————————————————————————
# TEST REPORT JOB
# ———————————————————————————————————————————————————————
report_tests:
name: "🚛 Test report"
runs-on: ubuntu-latest
timeout-minutes: 10
# continue-on-error allows this job to run even if 'ci' fails
continue-on-error: true
needs: [ci]
steps:
- name: Test Report
uses: dorny/test-reporter@v1
with:
artifact: test-results
name: Test Report
path: "**/tests.json"
reporter: flutter-json
fail-on-error: false