File tree Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Expand file tree Collapse file tree 5 files changed +29
-3
lines changed Original file line number Diff line number Diff line change 8
8
jobs :
9
9
test :
10
10
runs-on : ubuntu-latest
11
+ permissions :
12
+ checks : write
13
+ pull-requests : write
11
14
steps :
12
15
- uses : actions/checkout@v4
13
16
- uses : denoland/setup-deno@v2
14
17
with :
15
18
deno-version : v2.x
16
- - run : deno task test-all
19
+ - run : deno task test --coverage --junit-path=junit.xml
20
+ env :
21
+ RUST_BACKTRACE : ${{ runner.debug }}
22
+ - uses : EnricoMi/publish-unit-test-result-action@v2
23
+ with :
24
+ check_name : " Test Results"
25
+ files : junit.xml
26
+ continue-on-error : true
27
+ - if : ' !cancelled()'
28
+ uses : codecov/test-results-action@v1
29
+ with :
30
+ token : ${{ secrets.CODECOV_TOKEN }}
31
+ - run : deno coverage --lcov > coverage.lcov
32
+ - uses : codecov/codecov-action@v5
33
+ with :
34
+ token : ${{ secrets.CODECOV_TOKEN }}
35
+ files : coverage.lcov
36
+ - run : deno task check
17
37
18
38
publish :
19
39
if : github.event_name == 'push'
Original file line number Diff line number Diff line change
1
+ coverage /
Original file line number Diff line number Diff line change 4
4
==================
5
5
6
6
[ ![ GitHub Actions] [ GitHub Actions badge ]] [ GitHub Actions ]
7
+ [ ![ Codecov] [ Codecov badge ]] [ Codecov ]
7
8
8
9
> [ !NOTE]
9
10
> BotKit is still in early development. The API may change in the future.
@@ -60,6 +61,8 @@ For more information, see the [BotKit docs][BotKit].
60
61
[ BotKit ] : https://botkit.fedify.dev/
61
62
[ GitHub Actions ] : https://github.com/dahlia/botkit/actions/workflows/main.yaml
62
63
[ GitHub Actions badge ] : https://github.com/dahlia/botkit/actions/workflows/main.yaml/badge.svg
64
+ [ Codecov ] : https://codecov.io/gh/dahlia/botkit
65
+ [ Codecov badge ] : https://codecov.io/gh/dahlia/botkit/graph/badge.svg?token=dMbBbQvk4v
63
66
[ ActivityPub ] : https://activitypub.rocks/
64
67
[ Fedify ] : https://fedify.dev/
65
68
Original file line number Diff line number Diff line change 41
41
"check" : " deno check src/ && deno lint && deno fmt --check && deno publish --dry-run --allow-dirty" ,
42
42
"test" : " deno test --allow-net=hollo.social" ,
43
43
"test-all" : " deno task check && deno task test" ,
44
+ "coverage" : " deno task test --coverage && deno coverage --html" ,
44
45
"hooks:install" : " deno run --allow-read=deno.json,.git/hooks/ --allow-write=.git/hooks/ jsr:@hongminhee/deno-task-hooks" ,
45
46
"hooks:pre-commit" : " deno task check"
46
47
}
Original file line number Diff line number Diff line change @@ -38,6 +38,7 @@ import {
38
38
markdown ,
39
39
mention ,
40
40
mentions ,
41
+ strong ,
41
42
type Text ,
42
43
text ,
43
44
} from "./text.ts" ;
@@ -471,10 +472,10 @@ Deno.test("em()", async () => {
471
472
472
473
Deno . test ( "strong()" , async ( ) => {
473
474
const session = bot . getSession ( "https://example.com" ) ;
474
- const t : Text < "inline" , void > = em ( "Hello, World" ) ;
475
+ const t : Text < "inline" , void > = strong ( "Hello, World" ) ;
475
476
assertEquals (
476
477
( await Array . fromAsync ( t . getHtml ( session ) ) ) . join ( "" ) ,
477
- "<em >Hello, World</em >" ,
478
+ "<strong >Hello, World</strong >" ,
478
479
) ;
479
480
assertEquals ( await Array . fromAsync ( t . getTags ( session ) ) , [ ] ) ;
480
481
assertEquals ( t . getCachedObjects ( ) , [ ] ) ;
You can’t perform that action at this time.
0 commit comments