-
-
Notifications
You must be signed in to change notification settings - Fork 2.7k
93 lines (79 loc) · 2.87 KB
/
Copy pathci.yml
File metadata and controls
93 lines (79 loc) · 2.87 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
name: CI
on: [push, pull_request]
permissions:
contents: read # to fetch code (actions/checkout)
jobs:
test:
name: Test on ${{ matrix.os }}
runs-on: ${{ matrix.os }}
strategy:
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
steps:
- name: Checkout source code
uses: actions/checkout@v7.0.1
with:
fetch-depth: 10
persist-credentials: false
- name: Set up Python
uses: actions/setup-python@v7.0.0
with:
python-version: "3.14"
- name: Install calibre dependencies
run:
python setup/unix-ci.py install
- name: Bootstrap calibre
run:
python setup/unix-ci.py bootstrap
# Downloads the Camoufox browser, without which the browser
# automation tests skip themselves
- name: Download browser automation dependencies
env:
# Needed to avoid 403 errors from the GitHub API, whose
# unauthenticated rate limit is shared with every other job
# running on the same runner IP address
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run:
python setup/unix-ci.py browser-deps
- name: Test calibre
env:
PYTHONWARNINGS: error
CALIBRE_SHOW_DEPRECATION_WARNINGS: 1
run:
python setup/unix-ci.py test
archtest:
name: Test on Arch
runs-on: ubuntu-latest
container:
image: 'archlinux/archlinux:latest'
env:
CI: 'true'
steps:
- name: Setup container
run: |
pacman -Syu --noconfirm
pacman -S --noconfirm tar
- name: Checkout source code
uses: actions/checkout@v7.0.1
with:
fetch-depth: 10
persist-credentials: false
- name: Install calibre dependencies
run: setup/arch-ci.sh
- name: Bootstrap calibre
run: runuser -u ci -- python setup.py bootstrap --ephemeral --debug --sanitize
- name: Run type checker
run: ./setup.py type_check
- name: Run linter
run: ./setup.py check
- name: Run format checker
run: ./setup.py fmt --check-only
- name: Test calibre
env:
PYTHONWARNINGS: error
CALIBRE_SHOW_DEPRECATION_WARNINGS: 1
run: |
set -xe
runuser -u ci -- python setup.py test --under-sanitize
echo "Running test_rs"
runuser -u ci -- python setup.py test_rs