-
Notifications
You must be signed in to change notification settings - Fork 116
49 lines (43 loc) · 1.94 KB
/
third_party.yml
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
name: Type-check third-party bots
on:
push:
branches: [main]
paths:
- src/
- .github/workflows/third_party.yml
pull_request:
branches: [main]
paths:
- src/
- .github/workflows/third_party.yml
jobs:
deno:
runs-on: ubuntu-latest
strategy:
matrix:
url:
# please keep sorted
- https://raw.githubusercontent.com/dcdunkan/y-by-example/refs/heads/main/contents/commands.ts
- https://raw.githubusercontent.com/dcdunkan/y-by-example/refs/heads/main/contents/hello-world.ts
- https://raw.githubusercontent.com/dcdunkan/y-by-example/refs/heads/main/contents/inline-keyboards.ts
- https://raw.githubusercontent.com/dcdunkan/y-by-example/refs/heads/main/contents/message-formatting.ts
- https://raw.githubusercontent.com/grammyjs/docs-bot/refs/heads/main/main.ts
- https://raw.githubusercontent.com/grammyjs/guard-bot/refs/heads/main/bot.ts
steps:
- uses: denoland/setup-deno@v2
with:
deno-version: v2.x
- name: Create import_map.json
run: |
set -o pipefail;
curl --silent https://cdn.deno.land/grammy/meta/versions.json |
jq '
(.latest / ".")[0] as $major
| .versions
| map(select(startswith($major + ".")) | {
key: @uri "https://deno.land/x/grammy@\(.)/mod.ts",
value: @uri "https://raw.githubusercontent.com/grammyjs/grammY/\(env.GITHUB_SHA)/src/mod.ts"
})
| { imports: from_entries }
' > import_map.json
- run: deno check --allow-import --import-map=import_map.json --remote ${{ matrix.url }}