-
Notifications
You must be signed in to change notification settings - Fork 433
134 lines (120 loc) · 4.11 KB
/
test-install.yml
File metadata and controls
134 lines (120 loc) · 4.11 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
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
# Integration test for `quarto install` on platforms not covered by smoke tests.
# Smoke tests (test-smokes.yml) cover x86_64 Linux and Windows.
# This workflow fills the gap for arm64 Linux and macOS.
name: Test Tool Install
on:
workflow_dispatch:
push:
branches:
- main
- "v1.*"
paths:
- "src/tools/**"
- ".github/workflows/test-install.yml"
pull_request:
paths:
- "src/tools/**"
- ".github/workflows/test-install.yml"
schedule:
# Weekly Monday 9am UTC — detect upstream CDN/API breakage
- cron: "0 9 * * 1"
permissions:
contents: read
jobs:
test-install:
name: Install tools (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04-arm, macos-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- uses: ./.github/workflows/actions/quarto-dev
- name: Install TinyTeX
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
quarto install tinytex
- name: Install Chrome Headless Shell
run: |
quarto install chrome-headless-shell --no-prompt
- name: Verify tools with quarto check
run: |
quarto check install
test-chromium-deprecation:
name: Chromium deprecation warning (${{ matrix.os }})
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, ubuntu-24.04-arm, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
steps:
- name: Checkout Repo
uses: actions/checkout@v6
- uses: ./.github/workflows/actions/quarto-dev
- name: Make quarto available in bash (Windows)
if: runner.os == 'Windows'
shell: bash
run: |
quarto_cmd=$(command -v quarto.cmd)
dir=$(dirname "$quarto_cmd")
printf '#!/bin/bash\nexec "%s" "$@"\n' "$quarto_cmd" > "$dir/quarto"
chmod +x "$dir/quarto"
- name: Install chromium and capture result
id: install-chromium
shell: bash
run: |
set +e
output=$(quarto install chromium --no-prompt 2>&1)
exit_code=$?
set -e
echo "$output"
if echo "$output" | grep -Fq "is deprecated"; then
echo "deprecation-warning=true" >> "$GITHUB_OUTPUT"
fi
if [ "$exit_code" -eq 0 ]; then
echo "chromium-installed=true" >> "$GITHUB_OUTPUT"
fi
- name: Assert install deprecation warning was shown
shell: bash
run: |
if [ "${{ steps.install-chromium.outputs.deprecation-warning }}" != "true" ]; then
echo "::error::Deprecation warning missing from quarto install chromium output"
exit 1
fi
echo "Install deprecation warning found"
- name: Update chromium and capture result
id: update-chromium
shell: bash
run: |
set +e
output=$(quarto update chromium --no-prompt 2>&1)
set -e
echo "$output"
if echo "$output" | grep -Fq "is deprecated"; then
echo "deprecation-warning=true" >> "$GITHUB_OUTPUT"
fi
- name: Assert update deprecation warning was shown
shell: bash
run: |
if [ "${{ steps.update-chromium.outputs.deprecation-warning }}" != "true" ]; then
echo "::error::Deprecation warning missing from quarto update chromium output"
exit 1
fi
echo "Update deprecation warning found"
- name: Verify quarto check warns about outdated Chromium
shell: bash
run: |
if [ "${{ steps.install-chromium.outputs.chromium-installed }}" != "true" ]; then
echo "Chromium install did not succeed on this platform, skipping check"
exit 0
fi
output=$(quarto check install 2>&1)
echo "$output"
if ! echo "$output" | grep -Fq "Chromium is outdated"; then
echo "::error::Outdated Chromium warning missing from quarto check"
exit 1
fi
echo "Outdated Chromium warning found in quarto check"