forked from misskey-dev/misskey
-
-
Notifications
You must be signed in to change notification settings - Fork 6
151 lines (129 loc) · 3.25 KB
/
test-backend.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
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
name: Test (backend)
on:
push:
branches:
- taiyme
- release
paths:
- .github/workflows/test-backend.yaml
- .github/misskey/test.yml
- packages/backend/**/*
- packages/misskey-js/**/*
pull_request_target:
branches:
- taiyme
- release
paths:
- .github/misskey/test.yml
- packages/backend/**/*
- packages/misskey-js/**/*
permissions:
contents: read
jobs:
pre-checkout:
name: Pre checkout
uses: ./.github/workflows/pre-checkout.yaml
unit-testing:
name: Unit testing
runs-on: ubuntu-22.04
needs:
- pre-checkout
strategy:
fail-fast: false
services:
postgres:
image: postgres:15
ports:
- 54312:5432
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:7
ports:
- 56312:6379
env:
MISSKEY_CONFIG_YML: ci_config.yaml
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ needs.pre-checkout.outputs.sha }}
fetch-depth: 1
submodules: true
- name: Enable corepack
run: |
corepack enable
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: .node-version
cache: pnpm
- name: Setup FFmpeg
uses: federicocarboni/setup-ffmpeg@37062fbf7149fc5578d6c57e08aed62458b375d6 # v3.1
- name: Install dependencies
run: |
pnpm i --frozen-lockfile
- name: Copy config
run: |
cp .github/misskey/test.yml ".config/${MISSKEY_CONFIG_YML}"
- name: Build
run: |
pnpm build
- name: Test
run: |
pnpm --filter backend test
# TODO: カバレッジレポートはまた今度
e2e-testing:
name: E2E testing
runs-on: ubuntu-22.04
needs:
- pre-checkout
strategy:
fail-fast: false
services:
postgres:
image: postgres:15
ports:
- 54312:5432
env:
POSTGRES_DB: test-misskey
POSTGRES_HOST_AUTH_METHOD: trust
redis:
image: redis:7
ports:
- 56312:6379
env:
MISSKEY_CONFIG_YML: ci_config.yaml
steps:
- name: Checkout
uses: actions/[email protected]
with:
persist-credentials: false
ref: ${{ needs.pre-checkout.outputs.sha }}
fetch-depth: 1
submodules: true
- name: Enable corepack
run: |
corepack enable
- name: Setup Node.js
uses: actions/[email protected]
with:
node-version-file: .node-version
cache: pnpm
- name: Setup FFmpeg
uses: federicocarboni/setup-ffmpeg@37062fbf7149fc5578d6c57e08aed62458b375d6 # v3.1
- name: Install dependencies
run: |
pnpm i --frozen-lockfile
- name: Copy config
run: |
cp .github/misskey/test.yml ".config/${MISSKEY_CONFIG_YML}"
- name: Build
run: |
pnpm build
- name: Test
run: |
pnpm --filter backend test:e2e
# TODO: カバレッジレポートはまた今度