File tree Expand file tree Collapse file tree 7 files changed +1794
-0
lines changed
Expand file tree Collapse file tree 7 files changed +1794
-0
lines changed Original file line number Diff line number Diff line change 1+ # This workflow will install Deno and run tests across stable and nightly builds on Windows, Ubuntu and macOS.
2+ # For more information see: https://github.com/denolib/setup-deno
3+
4+ name : grammY conversations
5+
6+ on :
7+ push :
8+ branches : [main]
9+ pull_request :
10+ branches : [main]
11+
12+ jobs :
13+ backport :
14+ runs-on : ubuntu-latest
15+ steps :
16+ - name : Setup repo
17+ uses : actions/checkout@v4
18+
19+ format-and-lint :
20+ runs-on : ubuntu-latest
21+ steps :
22+ - name : Setup repo
23+ uses : actions/checkout@v4
24+
25+ - uses : denoland/setup-deno@v2
26+ with :
27+ deno-version : v2.x
28+
29+ - name : Check Format
30+ run : deno fmt --check
31+
32+ - name : Lint
33+ run : deno lint
34+
35+ test :
36+ runs-on : ${{ matrix.os }} # runs a test on Ubuntu, Windows and macOS
37+
38+ strategy :
39+ matrix :
40+ os : [macOS-latest, windows-latest, ubuntu-latest]
41+
42+ steps :
43+ - name : Setup repo
44+ uses : actions/checkout@v4
45+
46+ - uses : denoland/setup-deno@v2
47+ with :
48+ deno-version : v2.x
49+
50+ - name : Cache Dependencies
51+ run : deno task check
52+
53+ - name : Run Tests
54+ run : deno task test
55+
56+ coverage :
57+ runs-on : ubuntu-latest
58+ steps :
59+ - name : Setup repo
60+ uses : actions/checkout@v4
61+ with :
62+ fetch-depth : 0
63+
64+ - uses : denoland/setup-deno@v2
65+ with :
66+ deno-version : v2.x
67+
68+ - name : Create coverage files
69+ run : deno task coverage
70+
71+ - name : Collect coverage
72+ uses : codecov/codecov-action@v1.0.10 # upload the report on Codecov
73+ with :
74+ file : ./coverage.lcov
Original file line number Diff line number Diff line change 1+ coverage.lcov
2+ test /cov_profile
3+ test /coverage
Original file line number Diff line number Diff line change 1+ {
2+ "recommendations" : [" denoland.vscode-deno" ]
3+ }
Original file line number Diff line number Diff line change 1+ {
2+ "editor.formatOnSave" : true ,
3+ "editor.codeActionsOnSave" : {
4+ "source.fixAll" : " explicit"
5+ },
6+ "editor.defaultFormatter" : " denoland.vscode-deno" ,
7+ "[typescript]" : {
8+ "editor.defaultFormatter" : " denoland.vscode-deno"
9+ },
10+ "[json]" : {
11+ "editor.defaultFormatter" : " denoland.vscode-deno"
12+ },
13+ "[jsonc]" : {
14+ "editor.defaultFormatter" : " denoland.vscode-deno"
15+ }
16+ }
Original file line number Diff line number Diff line change 1+ {
2+ "name" : " @grammyjs/sessions" ,
3+ "version" : " 0.0.1" ,
4+ "exports" : " ./mod.ts" ,
5+ "lock" : false ,
6+ "tasks" : {
7+ "check" : " deno cache --allow-import src/mod.ts" ,
8+ "test" : " deno test --allow-import test" ,
9+ "ok" : " deno fmt && deno lint && deno task test && deno task check" ,
10+ "clean" : " git clean -fX out test/cov_profile test/coverage coverage.lcov" ,
11+ "coverage" : " deno task clean && deno task test --coverage=./test/cov_profile && deno coverage --lcov --output=./coverage.lcov ./test/cov_profile" ,
12+ "report" : " genhtml ./coverage.lcov --output-directory ./test/coverage/ && echo 'Point your browser to test/coverage/index.html to see the test coverage report.'"
13+ },
14+ "exclude" : [
15+ " ./out/" ,
16+ " ./test/cov_profile" ,
17+ " .*/"
18+ ],
19+ "fmt" : {
20+ "indentWidth" : 4 ,
21+ "proseWrap" : " preserve"
22+ },
23+ "imports" : {
24+ "@grammyjs/debug" : " jsr:@grammyjs/debug@^0.1.2" ,
25+ "@std/assert" : " jsr:@std/assert@^1.0.11" ,
26+ "@std/testing" : " jsr:@std/testing@^1.0.9" ,
27+ // TODO: replace this with jsr when grammY is published there
28+ "grammy" : " https://raw.githubusercontent.com/grammyjs/grammY/refs/heads/v2/src/mod.ts"
29+ }
30+ }
You can’t perform that action at this time.
0 commit comments