-
Notifications
You must be signed in to change notification settings - Fork 0
80 lines (77 loc) · 2.28 KB
/
main.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
name: CI
on:
push:
branches:
- main
- develop
pull_request:
branches:
- main
- develop
# Allows you to run this workflow manually from the Actions tab
workflow_dispatch:
jobs:
pre-commit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Install dependencies
run: |
pip install pip --upgrade
if grep version pyproject.toml | grep -q "dev";
then pip install https://github.com/fiduswriter/fiduswriter/archive/develop.zip;
else pip install https://github.com/fiduswriter/fiduswriter/archive/main.zip;
fi
- uses: pre-commit/[email protected]
test:
runs-on: ubuntu-latest
steps:
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.13"
- name: Set up Node
uses: actions/setup-node@v4
with:
node-version: 22
- uses: actions/checkout@v4
- uses: nanasess/setup-chromedriver@master
- name: Install dependencies
run: |
sudo apt update
sudo apt install libjpeg-dev gettext zlib1g-dev git build-essential
if grep version pyproject.toml | grep -q "dev";
then pip install https://github.com/fiduswriter/fiduswriter/archive/develop.zip;
else pip install https://github.com/fiduswriter/fiduswriter/archive/main.zip;
fi
cd fiduswriter
mv ../ci/configuration.py ./
mv ../ci/.coveragerc ./
pip install requests[security]
pip install coverage
pip install coveralls
pip install selenium
pip install packaging
pip install webdriver-manager
pip install wheel
pip install pip --upgrade
coverage run $(which fiduswriter) setup --no-static
- name: Run test phplist
uses: nick-invision/retry@v3
with:
timeout_minutes: 8
max_attempts: 3
retry_on: error
command: |
cd fiduswriter
coverage run $(which fiduswriter) test phplist
- name: Coveralls
run: |
cd fiduswriter
coverage combine
coveralls --service=github
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}