-
Notifications
You must be signed in to change notification settings - Fork 1
90 lines (84 loc) · 2.46 KB
/
ci.yml
File metadata and controls
90 lines (84 loc) · 2.46 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
name: Full CI
on:
push:
pull_request:
permissions:
pull-requests: write
jobs:
check_pr_status:
uses: ./.github/workflows/check_pr.yml
build:
runs-on: ubuntu-latest
needs: check_pr_status
if: needs.check_pr_status.outputs.branch-pr == ''
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up node
uses: actions/setup-node@v4
with:
node-version: '22.10'
- name: Install dependencies
run: |
cd backend
npm install
- name: Build JS resources
run: |
cd backend
npm run build
- name: Setup Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Python dependencies
run: |
pip install .[dev]
- name: Copy JS resources
run: |
mkdir -p ./qtmonaco/js_build
cp -r ./backend/dist/* ./qtmonaco/js_build
- name: Build python wheel
run: |
pip install wheel build
python -m build
- name: Upload js build artifacts
uses: actions/upload-artifact@v4
with:
name: qtmonaco-js
path: ./qtmonaco/js_build
retention-days: 1
pytest:
env:
QTWEBENGINE_DISABLE_SANDBOX: 1
QT_QPA_PLATFORM: "offscreen"
runs-on: ubuntu-latest
needs: build
steps:
- name: Checkout code
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install os dependencies
shell: bash
run: |
sudo apt-get update
sudo apt-get install -y libgl1 libegl1 x11-utils libxkbcommon-x11-0 libdbus-1-3 xvfb
sudo apt-get -y install libnss3 libxdamage1 libasound2t64 libatomic1 libxcursor1
- name: Download js build artifacts
uses: actions/download-artifact@v4
with:
name: qtmonaco-js
path: ./qtmonaco/js_build
- name: Install Python dependencies
run: |
ls -la ./qtmonaco/js_build
pip install .[dev]
- name: Run Pytest with Coverage
id: coverage
run: pytest --random-order --cov=qtmonaco --cov-config=pyproject.toml --cov-branch --cov-report=xml --no-cov-on-fail tests/