-
-
Notifications
You must be signed in to change notification settings - Fork 625
95 lines (81 loc) · 2.14 KB
/
Copy pathpr-check-tests.yml
File metadata and controls
95 lines (81 loc) · 2.14 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
95
name: PR Check
on:
pull_request:
branches:
- main
jobs:
linting:
runs-on: ubuntu-latest
name: Linting
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Markdown lint
uses: DavidAnson/markdownlint-cli2-action@v23
with:
config: .github/.markdownlint-cli2.jsonc
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install Dependencies
run: |
cd frontend
npm install
cd ..
cd backend
pip install pre-commit ruff black
cd ..
- name: Run Linters
run: |
cd frontend/
npm run lint:check
npm run format:check
cd ..
cd backend/
pre-commit run --config ../.pre-commit-config.yaml --all-files || exit 1
cd ..
cd frontend/src-tauri/
cargo fmt -- --check
# Frontend Test Job
frontend:
runs-on: ubuntu-latest
name: Frontend Tests
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Node.js
uses: actions/setup-node@v3
with:
node-version: "18"
- name: Install Dependencies & Run Tests
run: |
cd frontend
npm install
npm test
# Backend Test Job
backend:
runs-on: ubuntu-latest
name: Backend Tests
steps:
- name: Checkout Code
uses: actions/checkout@v3
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: "3.11"
- name: Build check(Main backend)
run: |
cd backend
python -m pip install --upgrade pip
pip install -r requirements.txt
pyinstaller main.py --name PictoPy_Server --onedir --distpath dist
- name: Build check(Sync Microservice)
run: |
cd sync-microservice
pip install -r requirements.txt
pyinstaller main.py --name PictoPy_Sync_Microservice --onedir --distpath dist
- name: Run Tests
run: |
cd backend
pytest