-
-
Notifications
You must be signed in to change notification settings - Fork 7
61 lines (50 loc) · 1.46 KB
/
ci-deno.yaml
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
50
51
52
53
54
55
56
57
58
59
60
61
name: CI for Deno
on:
pull_request:
paths:
- .github/workflows/ci-deno.yaml
- tools/**/*.ts
push:
# main ブランチで codecov へカバレッジを送るために push でもトリガーする
paths:
- .github/workflows/ci-deno.yaml
- tools/**/*.ts
branches:
- main
permissions:
contents: read
env:
# deno が package.json にあるパッケージを deno.lock で管理しようとするのを防ぐ
# ref: https://github.com/denoland/deno/issues/17916
DENO_NO_PACKAGE_JSON: 1
jobs:
check:
name: Check Deno scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-deno
with:
no-deps: true
- name: Check format
run: |
deno fmt --ext=ts --check ./tools
- name: Check lint
run: |
deno lint ./tools
test:
name: Test Deno scripts
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: ./.github/actions/setup-deno
- name: Test
run: |
deno test --allow-env=LOG_LEVEL --allow-read=tools --coverage=cov_profile tools/
deno coverage cov_profile --lcov --output=cov_profile.lcov
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@b9fd7d16f6d7d1b5d2bec1a2887e65ceed900238 # v4.6.0
with:
flags: deno-unittests
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}