This repository has been archived by the owner on Sep 16, 2024. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 3
69 lines (57 loc) · 1.54 KB
/
dart_package.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
59
60
61
62
63
64
65
66
67
68
69
name: Dart Package Workflow
on:
workflow_call:
inputs:
analyze_directories:
required: false
type: string
default: 'lib test'
dart_sdk:
required: false
type: string
default: 'stable'
runs_on:
required: false
type: string
default: 'ubuntu-latest'
setup:
required: false
type: string
default: ''
upload_coverage:
required: false
type: boolean
default: false
working_directory:
required: false
type: string
default: '.'
jobs:
build:
defaults:
run:
working-directory: ${{inputs.working_directory}}
runs-on: ${{inputs.runs_on}}
steps:
- name: 📚 Git Checkout
uses: actions/checkout@v3
- name: 🎯 Setup Dart
uses: dart-lang/setup-dart@v1
with:
sdk: ${{inputs.dart_sdk}}
- name: 📝 Print Dart SDK version
run: dart --version
- name: 📦 Install Dependencies
run: dart pub get
- name: ⚙️ Run Setup
if: "${{inputs.setup != ''}}"
run: ${{inputs.setup}}
- name: ✨ Check Formatting
run: dart format --set-exit-if-changed .
- name: 🕵️ Analyze
run: dart analyze --fatal-infos --fatal-warnings ${{inputs.analyze_directories}}
- name: 🧪 Run Tests
run: dart test
- name: 📒 Check API Reference Documentation
if: ${{ inputs.runs_on == 'windows-2022' }}
run: dart doc --validate-links