generated from Soontao/ts-project-template
-
Notifications
You must be signed in to change notification settings - Fork 0
52 lines (43 loc) · 1.14 KB
/
nodejs.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
name: node-test
on:
push:
branches:
- "*"
pull_request:
branches:
- "*"
schedule:
- cron: "32 11 * * *"
jobs:
build:
runs-on: ubuntu-latest
services:
mysql:
image: mariadb:10
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
ports:
- 3306:3306
options: --health-cmd="mysqladmin ping" --health-interval=30s --health-timeout=5s --health-retries=10
strategy:
matrix:
node-version: [20.x]
steps:
- uses: actions/checkout@v4
- name: Use Node.js ${{ matrix.node-version }}
uses: actions/setup-node@v4
with:
node-version: ${{ matrix.node-version }}
- run: npm i -g npm
- run: npm i
- name: setup mysql user
run: node ./docker/create_user.js
- name: test
run: npm run test
env:
CI: true
CDS_REQUIRES_DB_CREDENTIALS_HOST: "127.0.0.1"
CDS_REQUIRES_DB_CREDENTIALS_PORT: 3306
CDS_REQUIRES_DB_CREDENTIALS_DATABASE: cds_admin
CDS_REQUIRES_DB_CREDENTIALS_USER: cds_admin
CDS_REQUIRES_DB_CREDENTIALS_PASSWORD: cds_admin