forked from axel-op/dart-package-analyzer
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathaction.yml
More file actions
89 lines (84 loc) · 3.17 KB
/
action.yml
File metadata and controls
89 lines (84 loc) · 3.17 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
82
83
84
85
86
87
88
89
name: "Dart/Flutter Package Analyzer (PANA)"
description: "Performs static analysis, linting, formatting, to compute the Pub score of your Dart/Flutter package."
author: "esarbanis"
branding:
color: "blue"
icon: "feather"
inputs:
flutter_version:
description: "The version of Flutter to use"
required: false
default: "3.13.9"
flutter_channel:
description: "The channel of Flutter to use"
required: false
default: "stable"
relativePath:
description: "Path of the package relatively to the root of the repository"
required: false
default: ""
outputs:
total:
description: "Total score of the package"
value: '${{ steps.parse-output.outputs.TOTAL }}'
total_max:
description: "Maximum score the package can get"
value: '${{ steps.parse-output.outputs.TOTAL_MAX }}'
conventions:
description: "Score for the category 'Follow Dart file conventions'"
value: '${{ steps.parse-output.outputs.CONVENTIONS }}'
conventions_max:
description: "Maximum score for the category 'Follow Dart file conventions'"
value: '${{ steps.parse-output.outputs.CONVENTIONS_MAX }}'
documentation:
description: "Score for the category 'Provide documentation'"
value: '${{ steps.parse-output.outputs.DOCUMENTATION }}'
documentation_max:
description: "Maximum score for the category 'Provide documentation'"
value: '${{ steps.parse-output.outputs.DOCUMENTATION_MAX }}'
platforms:
description: "Score for the category 'Support multiple platforms'"
value: '${{ steps.parse-output.outputs.PLATFORMS }}'
platforms_max:
description: "Maximum score for the category 'Support multiple platforms'"
value: '${{ steps.parse-output.outputs.PLATFORMS_MAX }}'
analysis:
description: "Score for the category 'Static analysis'"
value: '${{ steps.parse-output.outputs.ANALYSIS }}'
analysis_max:
description: "Maximum score for the category 'Static analysis'"
value: '${{ steps.parse-output.outputs.ANALYSIS_MAX }}'
dependencies:
description: "Score for the category 'Support up-to-date dependencies'"
value: '${{ steps.parse-output.outputs.DEPENDENCIES }}'
dependencies_max:
description: "Maximum score for the category 'Support up-to-date dependencies'"
value: '${{ steps.parse-output.outputs.DEPENDENCIES_MAX }}'
json_output:
description: "The pana output in JSON format"
value: '${{ steps.parse-output.outputs.JSON_OUTPUT }}'
runs:
using: 'composite'
steps:
- name: Install Flutter
uses: subosito/flutter-action@v2
with:
flutter-version: ${{ inputs.flutter_version }}
cache: true
channel: ${{ inputs.flutter_channel }}
- name: Disable Flutter Analytics
run: flutter config --no-analytics
shell: bash
- name: Install PANA
run: dart pub global activate pana
shell: bash
- name: Run PANA
run: dart pub global run pana --no-warning ${{ inputs.relativePath }} --json >> pana_output.json
shell: bash
- name: make script executable
run: chmod +x $GITHUB_ACTION_PATH/parse_output.sh
shell: bash
- name: Parse PANA output
id: parse-output
run: $GITHUB_ACTION_PATH/parse_output.sh
shell: bash