-
Notifications
You must be signed in to change notification settings - Fork 4
151 lines (127 loc) · 3.94 KB
/
ci.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
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
# This workflow will run all checks required for a PR to be merged.
name: ci
on:
push:
branches: [main]
pull_request:
branches: [main]
env:
# be sure to also update these in other workflows
DENO_DIR: deno_dir
DENO_VERSION: "1.42.3"
jobs:
lint:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
deno_dir
.denoTypes
npm_packages
studio/deps
key: ci-${{ github.run_id }}_${{ github.run_attempt }}
restore-keys: ci-
- name: Setup Deno
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Lint
run: deno task lint --all
check:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
deno_dir
.denoTypes
npm_packages
studio/deps
key: ci-${{ github.run_id }}_${{ github.run_attempt }}
restore-keys: ci-
- name: Setup Deno
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Type check
run: deno task check
unit-tests:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
deno_dir
.denoTypes
npm_packages
studio/deps
key: ci-${{ github.run_id }}_${{ github.run_attempt }}
restore-keys: ci-
- name: Setup Deno
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Run unit tests
run: deno task test test/unit --coverage
- name: Codecov
uses: codecov/codecov-action@v4
with:
files: .coverage/cov.lcov
flags: unittests
token: ${{ secrets.CODECOV_TOKEN }}
commit_parent: ${{ github.event.pull_request.head.sha }}
minified-tests:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
deno_dir
.denoTypes
npm_packages
studio/deps
key: ci-${{ github.run_id }}_${{ github.run_attempt }}
restore-keys: ci-
- name: Setup Deno
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Run minified tests
run: deno task test test/minified
e2e-tests:
runs-on: ubuntu-latest
steps:
- name: Setup repo
uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8
- name: Cache
uses: actions/cache@9b0c1fce7a93df8e3bb8926b0d6e9d89e92f20a7
with:
path: |
deno_dir
.denoTypes
npm_packages
studio/deps
key: ci-${{ github.run_id }}_${{ github.run_attempt }}
restore-keys: ci-
- name: Setup Deno
uses: denoland/setup-deno@041b854f97b325bd60e53e9dc2de9cb9f9ac0cba
with:
deno-version: ${{ env.DENO_VERSION }}
- name: Run e2e tests
run: deno task test test/e2e
build:
if: ${{ github.event_name != 'pull_request' }}
uses: ./.github/workflows/build.yml