This repository was archived by the owner on Sep 12, 2024. It is now read-only.
File tree 2 files changed +47
-6
lines changed
2 files changed +47
-6
lines changed Original file line number Diff line number Diff line change
1
+ # name: check-graphviz-file
2
+ # ts-graphviz/setup-graphviz@v1 : https://github.com/ts-graphviz/setup-graphviz
3
+ # tj-actions/changed-files@v9 : https://github.com/tj-actions/changed-files
4
+ # Trigger the workflow on [pull_request, push]
5
+ # but only for the main/master branch
6
+ on :
7
+ pull_request :
8
+ branches : [ master ]
9
+ push :
10
+ branches : [ master]
11
+
12
+ jobs :
13
+ check-graphviz-file :
14
+ runs-on : ubuntu-latest
15
+
16
+ steps :
17
+ - uses : actions/checkout@v2
18
+ with :
19
+ fetch-depth : 0
20
+
21
+ - uses : ts-graphviz/setup-graphviz@v1
22
+
23
+ - name : Get specific changed file(s)
24
+ id : changed-files-specific
25
+ uses : tj-actions/changed-files@v9
26
+ with :
27
+ files : |
28
+ error-handling.gv
29
+
30
+ - name : Create svg if the listed file changed
31
+ if : steps.changed-files-specific.outputs.only_changed == 'true'
32
+ run : |
33
+ dot -Tsvg error-handling.gv > error-handling.svg
34
+
35
+ - name : ' Upload Artifact if the listed file changed'
36
+ if : steps.changed-files-specific.outputs.only_changed == 'true'
37
+ uses : actions/upload-artifact@v2
38
+ with :
39
+ name : error-handling
40
+ path : error-handling.svg
41
+ retention-days : 30
Original file line number Diff line number Diff line change 1
1
digraph g {
2
2
graph [
3
3
rankdir = " LR" ;
4
- label = <<u>Error Handling</u>>;
4
+ // title
5
+ labelloc = " t" ;
6
+ label = <<b><u>Error Handling</u></b>>;
5
7
];
6
8
7
9
node [
@@ -13,7 +15,6 @@ digraph g {
13
15
label = " < T >"
14
16
shape = plain
15
17
fontsize =9
16
- PORT = " f0"
17
18
id = 0
18
19
];
19
20
@@ -49,17 +50,16 @@ digraph g {
49
50
id = 4
50
51
];
51
52
52
- // Layout
53
-
53
+ // Layout
54
54
// T to Option {reverse direction i.e. <-}
55
- {T:f0 -> Option:f0 [
55
+ {T -> Option:f0 [
56
56
dir =back
57
57
label =" Some(T)\n unwrap()"
58
58
fontsize =8
59
59
];
60
60
}
61
61
62
- Result:f0 -> T:f0 [
62
+ Result:f0 -> T [
63
63
label =" Ok(T)\n unwrap()"
64
64
fontsize =8
65
65
];
You can’t perform that action at this time.
0 commit comments