File tree 2 files changed +10
-5
lines changed
2 files changed +10
-5
lines changed Original file line number Diff line number Diff line change 1
- #!/usr/bin/env zx --experimental
1
+ #!/usr/bin/env zx
2
2
3
3
const expected = 90
4
4
const exclude = [
5
5
'expr/test' ,
6
6
'checker/mock' ,
7
7
'vm/func_types' ,
8
8
'vm/runtime/helpers' ,
9
+ 'internal/difflib' ,
10
+ 'internal/spew' ,
11
+ 'internal/testify' ,
9
12
]
10
13
11
14
cd ( path . resolve ( __dirname , '..' , '..' ) )
@@ -24,9 +27,11 @@ await spinner('Running tests', async () => {
24
27
await $ `go tool cover -html=coverage.out -o coverage.html`
25
28
} )
26
29
27
- const cover = await $ `go tool cover -func=coverage.out`
30
+ const cover = await $ ( { verbose : true } ) `go tool cover -func=coverage.out`
28
31
const total = + cover . stdout . match ( / t o t a l : \s + \( s t a t e m e n t s \) \s + ( \d + \. \d + ) % / ) [ 1 ]
29
32
if ( total < expected ) {
30
33
echo ( chalk . red ( `Coverage is too low: ${ total } % < ${ expected } % (expected)` ) )
31
34
process . exit ( 1 )
35
+ } else {
36
+ echo ( `Coverage is good: ${ chalk . green ( total + '%' ) } >= ${ expected } % (expected)` )
32
37
}
Original file line number Diff line number Diff line change 11
11
runs-on : ubuntu-latest
12
12
steps :
13
13
- uses : actions/checkout@v3
14
- - name : Setup Go 1.18
14
+ - name : Setup Go 1.12
15
15
uses : actions/setup-go@v4
16
16
with :
17
- go-version : 1.18
17
+ go-version : 1.12
18
18
- name : Test
19
- run : npx zx --experimental .github/scripts/coverage.mjs
19
+ run : npx zx .github/scripts/coverage.mjs
You can’t perform that action at this time.
0 commit comments