-
Notifications
You must be signed in to change notification settings - Fork 23
144 lines (138 loc) · 3.87 KB
/
general.yaml
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
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
name: general
on:
push:
branches:
- main
tags:
- v*.*.*
pull_request:
branches:
- main
jobs:
# Test
test:
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Test software
run: make test
# End to End testing
# It is powered by WebdriverIO, it requires an application binary path in our dist folder.
# See wdio.conf.ts capabilities attribute for more info.
test-e2e:
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Build the application
run: make build
- name: Generate bundle file
run: make dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Make AppImage executable
run: |
chmod a+x ./dist/*.AppImage
ls -l ./dist
- name: Check chrome version
run: google-chrome --version
- name: Run headless test
uses: coactions/setup-xvfb@v1
with:
run: npm run wdio
# Build
# For GNU/Linux we need to build our application in the oldest version we want to support.
# https://pyinstaller.org/en/stable/usage.html?highlight=glibc#making-gnu-linux-apps-forward-compatible
build:
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
needs: [test, test-e2e]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Build software
run: make build
- name: Dist software
run: make dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
- name: Archive build artifacts
uses: actions/upload-artifact@v4
with:
name: distribution-files-${{ matrix.os }}
path: |
dist/*.deb
dist/*.exe
dist/*.dmg
retention-days: 14
# Release
release:
if: github.event_name == 'push' && contains(github.ref, 'refs/tags/')
strategy:
matrix:
os: [ubuntu-20.04, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
needs: [test, test-e2e]
steps:
- name: Checkout repository
uses: actions/checkout@v4
- name: Install Python
uses: actions/setup-python@v4
with:
python-version: '3.11'
- name: Install Node
uses: actions/setup-node@v3
with:
node-version: 20
- name: Prepare environment
run: pip3 install hatch
- name: Install dependencies
run: make install
- name: Build software
run: make build
- name: Dist software
run: make dist
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}