Skip to content

Commit 9497d1c

Browse files
committed
chore: add test github workflow
1 parent 47aac97 commit 9497d1c

File tree

1 file changed

+45
-0
lines changed

1 file changed

+45
-0
lines changed

.github/workflows/test.yml

Lines changed: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
1+
name: Test
2+
3+
on:
4+
push:
5+
branches: ['main']
6+
pull_request:
7+
branches: ['main']
8+
9+
jobs:
10+
test:
11+
runs-on: ${{ matrix.os }}
12+
13+
services:
14+
mysql:
15+
image: mysql:8.0
16+
env:
17+
MYSQL_ALLOW_EMPTY_PASSWORD: yes
18+
MYSQL_DATABASE: nano_test
19+
ports:
20+
- 3306:3306
21+
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
22+
23+
strategy:
24+
matrix:
25+
os: [ubuntu-latest]
26+
27+
steps:
28+
- name: Check out Git repository
29+
uses: actions/checkout@v1
30+
31+
- name: Install Node.js, NPM and Yarn
32+
uses: actions/setup-node@v3
33+
with:
34+
node-version: current
35+
36+
- name: yarn install
37+
run: |
38+
yarn install
39+
40+
- name: yarn test
41+
env:
42+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
43+
run: |
44+
yarn lint
45+
yarn test

0 commit comments

Comments
 (0)