-
-
Notifications
You must be signed in to change notification settings - Fork 1
73 lines (66 loc) · 1.73 KB
/
Copy pathcheck.yml
File metadata and controls
73 lines (66 loc) · 1.73 KB
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
name: Pull Request Checks
on:
workflow_call:
secrets:
CODECOV_TOKEN:
required: true
pull_request:
branches:
- main
push:
branches:
- main
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
permissions:
contents: read
jobs:
lint-and-build:
runs-on: ubuntu-latest
services:
postgres:
image: postgres:15
env:
POSTGRES_PASSWORD: synapse_password
POSTGRES_USER: synapse_user
POSTGRES_DB: synapse
options: >-
--health-cmd pg_isready
--health-interval 10s
--health-timeout 5s
--health-retries 5
ports:
- 5432:5432
mysql:
image: mysql:8.0
env:
MYSQL_ROOT_PASSWORD: synapse_root_password
MYSQL_DATABASE: synapse
MYSQL_USER: synapse_user
MYSQL_PASSWORD: synapse_password
options: >-
--health-cmd="mysqladmin ping"
--health-interval=10s
--health-timeout=5s
--health-retries=3
ports:
- 3306:3306
steps:
- uses: actions/checkout@v6
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: corepack enable
- run: yarn config set enableImmutableInstalls false
- run: yarn
- run: yarn build
- run: yarn lint
- run: yarn test --coverage
env:
DB_PG: postgresql://synapse_user:synapse_password@localhost:5432/synapse
DB_MYSQL: mysql://synapse_user:synapse_password@localhost:3306/synapse
- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v5.4.3
with:
token: ${{ secrets.CODECOV_TOKEN }}