-
Notifications
You must be signed in to change notification settings - Fork 5
92 lines (78 loc) · 1.94 KB
/
test.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
name: Test
on:
push:
branches: [master, devel]
pull_request:
branches: [master, devel]
jobs:
test-packaging:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- name: "Run pip install"
run: |
pip install .
test:
runs-on: ubuntu-latest
services:
mysql-mlwh:
image: mysql:8.0
ports:
- 3306:3306
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_TCP_PORT: 3306
MYSQL_USER: "test"
MYSQL_PASSWORD: "test"
MYSQL_DATABASE: "mlwarehouse"
mysql-qcdb:
image: mysql:8.0
ports:
- 3307:3307
options: >-
--health-cmd "mysqladmin ping"
--health-interval 10s
--health-timeout 5s
--health-retries 10
env:
MYSQL_RANDOM_ROOT_PASSWORD: yes
MYSQL_TCP_PORT: 3307
MYSQL_USER: "test"
MYSQL_PASSWORD: "test"
MYSQL_DATABASE: "langqc"
steps:
- uses: actions/checkout@v4
- name: Install Poetry
run: |
pipx install poetry
- uses: actions/setup-python@v5
with:
python-version: '3.10'
architecture: 'x64'
- name: Run poetry install
run: |
poetry env use '3.10'
poetry install
- name: Run pytest
run: |
poetry run pytest
test-frontend:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
with:
node-version: '20'
- run: npm install
working-directory: ./frontend
- run: npm run test
working-directory: ./frontend