-
Notifications
You must be signed in to change notification settings - Fork 5
94 lines (84 loc) · 2.37 KB
/
tests.yml
File metadata and controls
94 lines (84 loc) · 2.37 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
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
name: tests
on:
push:
branches:
- '**'
tags:
- '!**'
pull_request:
branches:
- '**'
permissions:
contents: read
jobs:
backend:
services:
mysql:
image: mariadb:11.8
env:
MYSQL_ROOT_PASSWORD: root
ports:
- 3306:3306
options: >-
--health-cmd="healthcheck.sh --connect --innodb_initialized"
--health-interval=10s
--health-timeout=5s
--health-retries=3
strategy:
matrix:
python-version: [3.11, 3.12, 3.13]
runs-on: ubuntu-latest
name: Python ${{ matrix.python-version }}
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@a309ff8b426b58ec0e2a45f0f869d46889d02405 # v6.2.0
with:
python-version: ${{ matrix.python-version }}
- name: Install poetry
run: |
pipx install poetry
- name: Install dependencies
run: |
poetry install -vvv
poetry run pip install -r requirements_dev.txt
- name: Set MySQL mode
env:
DB_HOST: 127.0.0.1
DB_PORT: ${{ job.services.mysql.ports[3306] }}
run: |
mysql --host $DB_HOST --port $DB_PORT -uroot -proot -e "SET GLOBAL sql_mode = 'NO_AUTO_CREATE_USER,NO_ENGINE_SUBSTITUTION'";
- name: Lint files
run: |
poetry run ruff check --output-format=github
- name : Check format
run: |
poetry run ruff format --diff
- name: Tests
run: |
poetry run pytest -s
frontend:
strategy:
matrix:
node-version: [20.x]
runs-on: ubuntu-latest
name: Node ${{ matrix.node-version }}
steps:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: Setup Node ${{ matrix.node-version }}
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with:
node-version: ${{ matrix.node-version }}
- name: Install dependencies
working-directory: ./ui
run: yarn install
- name: Run ESLint
working-directory: ./ui
run: yarn lint
- name: Check format
working-directory: ./ui
run: yarn format:check
- name: Run unit tests
working-directory: ./ui
run: yarn test:unit