-
Notifications
You must be signed in to change notification settings - Fork 1.4k
72 lines (66 loc) · 2.09 KB
/
Copy pathtest.yml
File metadata and controls
72 lines (66 loc) · 2.09 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
name: Test wiki Linux
on: [push, pull_request]
# paths:
# - "*"
# - "!README.md" <-- don't rebuild on doc change
env:
TEST: "1"
jobs:
pre-commit:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v6
with:
python-version: "3.10"
- uses: pre-commit/action@v3.0.1
shellcheck:
runs-on: ubuntu-slim
steps:
- uses: actions/checkout@v7
- run: find . -type f -name "*.sh" -exec shellcheck {} +
build-linux:
runs-on: ubuntu-22.04
strategy:
fail-fast: false # don't cancel if a job from the matrix fails
matrix:
python-version: ["3.10"]
steps:
- uses: actions/checkout@v7
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v6
with:
python-version: ${{ matrix.python-version }}
- name: Setting environment
run: |
mkdir /tmp/web
./Sphinxsetup.sh
- name: Check image formats
run: |
for i in $(find ./images/); do
BAD=false
if file "$i" | grep RIFF; then
echo "$i contains RIFF metadata; process file to remove"
BAD=true
fi
if $BAD; then
echo "Bad images found"
exit 1
fi
done
- name: Register Sphinx problem matcher
run: echo "::add-matcher::.github/problem-matchers/sphinx.json"
- name: Test build
run: |
export AP_SPHINXOPTS=-W
./update.py --parallel 4 --verbose --destdir=/tmp/web 2>&1 | tee build_errors.txt; exit ${PIPESTATUS[0]}
- name: Report build errors
if: failure()
run: |
grep -iE '\[error\]|warning' build_errors.txt > filtered_errors.txt || true
if [ -s filtered_errors.txt ]; then
echo "## Build errors" >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
tail -c 900000 filtered_errors.txt | tail -n 500 >> "$GITHUB_STEP_SUMMARY"
echo '```' >> "$GITHUB_STEP_SUMMARY"
fi